Can't boot from external USB HDD - initrd problem?
The following problem pertains to a ZenWalk install but since ZenWalk uses the Slackware install routines, I'm assuming it pertains to Slackware too, and that's why I'm posting it here.
I've installed Zenwalk 2.8 on an external USB hard disk in a logical partition (sdb6) underneath an extended primary partition (sdb4). The external USB drive is a Western Digital Passport 60 GB IDE drive (sdb), and it's hooked up to a Dell Inspiron 6400 laptop with an 80 GB internal SATA HDD (sda).
The problem is that I can't boot ZenWalk from the external USB drive. I also installed ZenWalk on an available partition (sda6) of the internal drive, and that install boots just fine through the LILO that handles booting on that drive.
The partition layout of the external USB drive is as follows:
sdb1 primary. vfat Data
sdb2 prim. act. reiserfs MEPIS
sdb3 primary reiserfs Ubuntu
sdb4 prim. extended
sdb5 logical reiserfs not used
sdb6 logical reiserfs ZenWalk
During the ZenWalk install I chose to skip installing LILO because all the booting on the external drive is handled by GRUB which was installed by Ubuntu on the MBR of the external drive (sdb).
The GRUB entry for Zenwalk is as follows:
title ZenWalk at sdb6, kernel 18.104.22.168
kernel /boot/vmlinuz-22.214.171.124 root=/dev/sdb6 rootdelay=20 vga=791
ZenWalk by default does not set up an initial ramdisk. However, without it the boot process terminates in a kernel panic, after two or three screens of verbose boot messages had scrolled by (even after I'd added the rootdelay=20 parameter).
I created an initrd file for ZenWalk on the USB drive from the bootable ZenWalk install on the internal drive as follows:
# mkinitrd -c -k 126.96.36.199 -m usb-storage -f reiserfs -r /mnt/sdb6 -o /mnt/sdb6/boot/initrd.gz
[EDIT: After I posted this, I thought I'd make a mistake with "- r /mnt/sdb6", and I built a new initrd.gz with "-r /dev/sdb6" and tried to boot with that but that didn't change anything. It merely replaced all entries of "/mnt/sdb6" with "/dev/sdb6" in the boot messages below.]
At first, I'd also included "-m reiserfs" in the above command but ZenWalk responded with 'WARNING: Could not find module for "reiserfs" '. I don't know whether the absence of that module is critical. I should also say that at first I'd installed ZenWalk on the external drive with the xfs filesystem, then run into these boot problems and then reinstalled ZenWalk with reiserfs, with no improvement in the situation. The ZenWalk install on the internal drive uses xfs though.
I've worked on this for two or three days now and run out of options to pursue, including running many options from the RIPLinuX rescue live CD. What do I have to do to get Zenwalk to boot on the external USB drive? MEPIS and Ubuntu boot fine from it - I just hit F12 during the POST and then pick "USB Storage Device" from the list of boot options. That brings up the Ubuntu GRUB boot menu, and I can boot the other OS's on the USB drive from there - but not ZenWalk.
Here are the last few boot messages before the process stops at a console root prompt:
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem)
/boot/initrd.gz: Loading kernel modules from initrd image:
Initializing USB Mass Storage driver
usbcore: registered new driver usb-storage
USB Mass Storage support registered
mount: Mounting /mnt/sdb6 on /mnt failed: No such file or directory
ERROR: mount returned error code 1. Trouble ahead.
mount: Mounting /mnt/sdb6 on /mnt failed: Invalid argument
mount: Mounting /mnt/sdb6 on /mnt failed: Invalid argument
pivot_root: pivot_root: Device or resource busy
Freeing unused kernel memory: 200K freed
What's wrong? Is there a problem with the entry for sdb6 in the partition table for sdb? Or is the problem that ZenWalk resides in a logical, rather than primary partition?
You need to make a custom initrd that not only loads the modules but also has a 'sleep' time of around 5 seconds so the modules can finish initializing before rootfs getts mounted. Find a boot-floppy for RUNT linux and study the initrd that is used for a working example.
I did finally manage to get Zenwalk to boot off my external USB hard
drive. Thanks for your tips, gnashley.
I would think that the same considerations would hold for a USB HDD
install of slackware with the default plain vanilla kernel without USB
I had to make a custom initial ramdisk (initrd) with modules for USB
support, add a sleep delay to linuxrc and also add a rootdelay to the
Zenwalk entry in the GRUB menu.lst.
To be specific, I used the following procedure:
1. Install Zenwalk 2.8 to partition /dev/sdb6 of the external USB hard
drive, using the default "sata" kernel and reiserfs and installing LILO
on the superblock of the sdb6 partition (i.e. in its root). sdb6 is a
logical partition underneath an extended primary partition (sdb4). This
install isn't bootable as yet.
2. Also install Zenwalk 2.8 with identical settings to a partition
(sda6) on the bootable internal SATA hard drive. This install of
Zenwalk can be booted via LILO which was installed by Debian
in the MBR of this HDD.
3. Boot into the latter install and run [one long line] (for details see
mkinitrd -c -k 188.8.131.52 -m ehci_hcd:uhci_hcd:ohci_hcd:usb-storage
-f reiserfs -r /dev/sdb6 -o /boot/initrd.gz
4. Edit /boot/initrd-tree/linuxrc by adding the following line just
before "# Initialize LVM:"
5. Rerun "mkinitrd" (without any options) to rebuild initrd.gz
6. Copy initrd.gz from this install to the other Zenwalk install:
cp /boot/initrd.gz /mnt/sdb6/boot/initrd.gz
7. Add the following entry for Zenwalk in the config file of the
bootloader for the external USB HDD.
In my case this is GRUB's menu.lst, installed by Ubuntu.
title Zenwalk at sdb6, kernel 184.108.40.206
kernel /boot/vmlinuz-220.127.116.11 root=/dev/sdb6 rootdelay=10 vga=791
For LILO, it would have to look somewhat like this:
append="root=/dev/sdb6 rootdelay=10 quiet "
8. Reboot, during the POST hit F12 and pick "USB Storage Device" from
the list of boot devices. Then from the GRUB or LILO menu pick Zenwalk.
|All times are GMT -5. The time now is 12:58 AM.|