Boot Sequence Does Not Complete


Forum: HD Install
Topic: Boot Sequence Does Not Complete
started by: Juanito

Posted by Juanito on Mar. 25 2008,07:21
I made a dumb mistake the other day - I added a task to bootlocal.sh with no definate end that was not backgrounded and thus the boot sequence could not complete.

As far as I could tell, the only way to get out of the situation was by using <ctrl-alt-del> which shut down the machine.

All that needed doing to fix the problem was to comment out one line in bootlocal.sh, but...

1. On a frugal-hd-lilo install, I cannot enter "base norestore" at the prompt (because there isn't one) so I was stuck in the loop.
2. After a floppy "fromusb" boot I edited bootlocal.sh in backup.tar.gz using emelFM, but this caused the file to be unreadable on the next frugal-hd-lilo boot
3. After another floppy "fromusb" boot I moved backup.tar.gz, effectively creating a "norestore" situation on the next frugal-hd-lilo boot, but then after manually unpacking and copying a bunch of files from backup.tar.gz I of course missed some...

Apart from not making dumb mistakes in the first place, there has to be a better/smarter/easier way to fix this kind of error - any suggestions for next time would be gratefully received  :)

[NB: frugal-hd-lilo boot = 5mins, floppy "fromusb" boot = 10mins on this machine]

Posted by ^thehatsrule^ on Mar. 25 2008,14:00
With Lilo, I think you'd be out of luck unless there is some way of interrupting init with some key codes (ctrl c? which probably won't work) or remoting in perhaps (one reason why I always start sshd)...

For your "fromusb" boot: why not use "fromhd" instead?
Or create your own specific rescue entry in lilo (or on a bootfloppy)...

Or you could use another bootloader (if you can).

Posted by curaga on Mar. 25 2008,14:42
Well, I would've used a boot floppy with grub to boot your installation, only with the norestore option.
It is surprisingly handy; and you don't have to include DSL specifically in the menu, just go to the command line and use cat to look at all the options in lilo.conf, then adapt slightly for grub, and boot.

Posted by roberts on Mar. 25 2008,15:45
I agree having grub boot floppy is a life saver, a must have tool. It has saved me from my oops many times.
Posted by Juanito on Mar. 27 2008,16:49
'made myself a grub boot floppy, but:
Quote
Check if you have turned on the support for INT 13 extension (LBA). If so, disable the support and see if GRUB can now access your SCSI disk. This will make it clear that your SCSI BIOS sucks.

For now, we know the following doesn't provide working LBA mode:
Adaptec AIC-7880

In the case where you have such a SCSI controller unfortunately, you cannot use the LBA mode, though GRUB still works fine in the CHS mode (so the well-known 1024 cylinders problem comes again to you).

- guess which kind of scsi adapter I have  :(

Posted by curaga on Mar. 27 2008,18:05
Oh. That clears me wondering why would you use lilo. Well, a boot partition works around that; or using the official DSL grub boot floppy, which includes the kernel and initrd on itself, so grub's limitations don't matter.
Posted by Juanito on Mar. 28 2008,10:05
I'm thinking that this should be possible with grub, I've tried grub-0.95, 0.97, 1.91 and legacy (so far I cannot compile grub2) and all seem to be unable to find the boot partition.

I created the grub boot floppy like this:
Code Sample
$ cd /opt/grub/lib/grub/i386-pc
$ sudo dd if=stage1 of=/dev/fd0 bs=512 count=1
1+0 records in
1+0 records out
512 bytes transferred in 0.612537 seconds (836 bytes/sec)
$ sudo dd if=stage2 of=/dev/fd0 bs=512 seek=1
203+1 records in
203+1 records out
104082 bytes transferred in 3.849574 seconds (27037 bytes/sec)
NB: I could not read the resulting floppy, but it boots

My lilo conf looks like this:
Quote
lba32          #enable large disk support
timeout=30     #wait 3 seconds before auto-booting
vga=791
boot=/dev/sdb3   #put Lilo boot loader in partition of target disk
root=/dev/sdb3   #set root to be partition of target disk
image=/boot/linux24
label=DSL
initrd=/boot/minirt24.gz
read-only
APPEND="ramdisk_size=100000 init=/etc/init lang=us apm=power-off hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi nomce nodma quiet frugal BOOT_IMAGE=/KNOPPIX/KNOPPIX fromhd=/dev/sdb3 restore=sdb4 toram alsa syslog mydsl=sdb4"


At the grub boot prompt, I tried this:
Code Sample
> root (hd1,2)
error 22: no such partition
> rootnoverify hd(1,2)
> kernel /boot/linux24 root=/dev/sdb3
error 22: no such partition

- am I making a mistake somewhere?

Posted by ^thehatsrule^ on Mar. 28 2008,14:56
If I get what curaga is getting at, the boot partition would be of a small size being the very first (i.e. sdb1) just to hold the kernels and inirtd's so that it may get around size limitations. I'm assuming you're only using the grub floppy disk to install the bootloader here, and not act as a DSL bootfloppy.

Not sure what you really want to do now, but you could also look into rescue disks.

Posted by Juanito on Mar. 28 2008,15:12
Quote
Not sure what you really want to do now, but you could also look into rescue disks.

- all I want to do is to boot the dsl image on /mnt/sdb3 from a grub boot floppy so that I can pass dsl boot codes to it (eg base norestore) since I cannot from lilo.

I can already use a dsl boot floppy and boot "fromusb" to be able to access the frugal hd install and fix things, but it's very long on this old machine.

Anyway, progress is being made - I managed to compile grub2 (by replacing bison-1.875 in compile-3.3.5 with bison-2.15) and device.map at least mentions /dev/sdb which I never got in grub1.

Posted by curaga on Mar. 28 2008,15:35
Oh. I hadn't noticed DSL4 does not have a grub boot floppy. DSL 3 has. One could be manually made..
Posted by curaga on Mar. 28 2008,16:05
I made a grub bootfloppy for DSL 4. It's here:
< http://rapidshare.com/files/103060540/grubfloppy.img.html >

For your convenience, I included the aic7xxx scsi module in it :)

Posted by ^thehatsrule^ on Mar. 28 2008,19:19
Quote
- all I want to do is to boot the dsl image on /mnt/sdb3 from a grub boot floppy so that I can pass dsl boot codes to it (eg base norestore) since I cannot from lilo.

I can already use a dsl boot floppy and boot "fromusb" to be able to access the frugal hd install and fix things, but it's very long on this old machine.
You have many options then, but if you're concerned about speed:  Why not update lilo on you hd?  Or use a lilo bootdisk (I may be repeating myself here)?  Using a DSL (grub) bootfloppy will still be slow(er) because it'll read the kernel+minirt off the floppy.  If this isn't the case (i.e. you're actually referring to the USB speed), then any bootfloppy will work for you just by changing the menu config, although grub will be convenient here.

I assume you already know the state of grub2 development.

Posted by curaga on Mar. 28 2008,19:58
I haven't used lilo at all, but wouldn't a lilo floppy be equally useless as lilo on the HD?
Ie not being able to change options?

Posted by lucky13 on Mar. 28 2008,20:11
Quote
Ie not being able to change options?

You can change lilo.conf, you just have to be able to run lilo to update the changes.

Posted by Juanito on Mar. 29 2008,04:50
Quote
I assume you already know the state of grub2 development.

- very much a work in progress, the boot floppy acts like grub1...

Posted by Juanito on June 07 2008,06:47
Whilst playing around with linux from scratch (promted by curaga mentioning xorg-7.2 in beyond linux from scratch), I finally managed to get grub (grub-0.97) to write to a hd on my ancient scsi hd desktop.

I'd like to set grub up so it boots dsl-3.x from one hd, lfs from the other and dsl-n/dsl-4.x from usb sticks (in the same slot so they'd always be sdc1). So far, I've managed this as a grub menu:
Quote
# Begin /boot/grub/menu.lst

# By default boot the first menu entry.
default 0

# Allow 30 seconds before booting the default.
timeout 30

# Use prettier colors.
color green/black light-green/black

# The first entry is for LFS.
title LFS 6.3
root (hd0,1)
kernel /boot/lfskernel-2.6.22.5 root=/dev/sda2

# The second entry is for dsl-n
title dsl-n
root (hd2,0)
kernel /linux root=/dev/sdc1 dsl base norestore noacpi toram
initrd /minirt.gz
makeactive
boot

# the third entry is for dsl-3.x
title dsl-3.x
root (hd1,2)
kernel /boot/linux24 root=/dev/sdb3 lang=us apm=power-off nomce nodma quiet frugal restore=sdb4 toram alsa syslog mydsl=sdb4
initrd /boot/minirt24.gz
makeactive
boot

A couple of questions:

1. Do I need to include "ramdisk_size=100000 init=/etc/init" in the dsl-3.x entry?
2. dsl-n will not boot with the error "hd(2,0) does not exist" - I guess this is because /linux first needs to load before it can "see" /dev/sdc1. What's the best way to get around this, copy /linux somewhere on a hd?

Posted by curaga on June 07 2008,14:27
- makeactive is not needed
- you do need to include everything that's in DSL isolinux.cfg, including all ramdisk_size etc
edit: unless they wouldn't be needed there either, but that's another thing

About (hd2,0), you sure it's that? Did you see it in grub when typing hd( and tab?
If grub can't see it, the standard policy is indeed copying the kernel and initrd somewhere else. I use this often to boot cd's/usb's on comps that can't do so natively.

PS: Nice to see another LFS convert :)

Posted by Juanito on June 09 2008,14:32
Quote
About (hd2,0), you sure it's that? Did you see it in grub when typing hd( and tab?
- at the time I had used a floppy fromusb dsl-n boot to chroot into lfs and I think this allowed grub to "see" the usb stick as hd2. However, maybe I imagined this and anyway, when booted normally grub does not see the usb stick so I guess I will need to copy the dsl-n boot files to hd somwhere and boot fromhd=/dev/sdc1.

Also:
Quote
kernel /boot/linux24 root=/dev/sdb3 lang=us apm=power-off nomce nodma quiet frugal restore=sdb4 toram alsa syslog mydsl=sdb4
restores the backup but does not load the extensions in /mnt/sdb4/mydsl??

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.