LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation
User Name
Password
Slackware - Installation This forum is for the discussion of installation issues with Slackware.

Notices


Reply
  Search this Thread
Old 08-04-2006, 06:30 PM   #1
RobF
LQ Newbie
 
Registered: Aug 2004
Posts: 20

Rep: Reputation: 0
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 2.6.17.6
root (hd0,5)
kernel /boot/vmlinuz-2.6.17.6 root=/dev/sdb6 rootdelay=20 vga=791
initrd /boot/initrd.gz
savedefault
boot

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 2.6.17.6 -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:
Using /lib/modules/2.6.17.6/usb-storage.ko
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
/boot/initrd.gz: exiting
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?

Robert

Last edited by RobF; 08-04-2006 at 08:50 PM.
 
Old 08-05-2006, 11:55 AM   #2
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
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.
 
Old 08-07-2006, 09:04 PM   #3
RobF
LQ Newbie
 
Registered: Aug 2004
Posts: 20

Original Poster
Rep: Reputation: 0
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
support.

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
man mkinitrd)

mkinitrd -c -k 2.6.17.6 -m ehci_hcd:uhci_hcdhci_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:"

sleep 10

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 2.6.17.6
root (hd0,5)
kernel /boot/vmlinuz-2.6.17.6 root=/dev/sdb6 rootdelay=10 vga=791
initrd /boot/initrd.gz
savedefault
boot

For LILO, it would have to look somewhat like this:

image=/boot/vmlinuz-2.6.17.6
initrd=/boot/initrd.gz
label=Zenwalk_2.8_on_sdb6
vga=791
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.

Robert
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual boot XP(internal IDE HDD) Debian(external USB-IDE HDD) using boot.ini PolarDog Linux - Laptop and Netbook 2 07-01-2005 09:50 PM
Getting an USB external HDD xiongnu Mandriva 1 12-12-2004 08:11 PM
usb 2.0 external hdd drum2jc Linux - Hardware 0 12-07-2004 03:14 AM
USB external HDD yhus Linux - Hardware 1 06-07-2004 05:18 AM
External HDD USB SamothB Linux - Hardware 13 10-10-2003 04:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation

All times are GMT -5. The time now is 03:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration