LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (https://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   Help with mkinitrd for 10.2 Slackware Install to USB HDD (https://www.linuxquestions.org/questions/slackware-installation-40/help-with-mkinitrd-for-10-2-slackware-install-to-usb-hdd-437255/)

tICT 04-20-2006 06:18 PM

Help with mkinitrd for 10.2 Slackware Install to USB HDD
 
Am wanting to install 10.2 to a USB IDE Drive in an external IcyBox enclosure.

Concept is to have a backup - test system to XP; booting from USB direct for Slack (I have a BIOS option to select which drive to boot from rather than use a boot loader) and leaving the standard XP loader to handle normal starts.

Have partitioned the drive as follows
/dev/sda1 - Linux - Ext2 bootable
/dev/sda2 - Fat32 (for access by both OS)
/dev/sda3 - Swap

Things went well until the boot loader config. I have tried all options but to no avail!

Reading around I think I need to make a initrd to preload the USB HDD otherwise /root will not be visible on sda1.

any clues how? I know it involves mkinitrd, but I cannot mount the drive /dev/sda1 from the Slack Install CD, (I do have a Slax Live CD if I can use that...)

I was planning on

mkinitrd --with-usb --preload=ehci-hcd --preload=usb-storage --preload=scsi_mod --preload=sd_mod ./initrd.gz 2.4.31

in /boot
is that correct?

Cheers
J

gnashley 04-21-2006 02:00 PM

That seems like it would do it, but it may not. What happens is that the drivers take a few seconds to load, while kernel execution proceeds to other things. Your initrd should include a 'sleep' command of at least 2-3 seconds. Some folks use up to 15-20 sec. Take a look at the initrd for RUNT linux, which does what you want. Probably just plug it in where your kernel is and go.

tICT 04-21-2006 03:00 PM

Problem when I ran

chroot /mnt/sda1

mkinitrd --preload ehci-hcd --preload usb-storage --preload scsi_mod --preload sd_mod boot/initrd.gz vmlinuz-ide-2.4.31

I got the following warnings...

mount: could not find any free loop device
cat: /proc/partitions: No such file or directory
umount: /tmp/tmp.2WoZMn: not mounted
rmdir: `/tmp/tmp.oA6Nst': Directory not empty


I have tried to mount a loopback device manually but this fails too.

Any ideas?

J

tICT 04-23-2006 02:04 PM

Have now managed to sort the previous problem out (thanks due to Tomas of Slax fame). Solution is as follows:

This is what you must do before chroot
mount --rbind /dev /mnt/sda1/dev
mount --rbind /proc /mnt/sda1/proc
chroot /mnt/sda1

This way you'll have /dev and /proc ready after you chroot, so you can
try to execute mkinitrd again.

However...!

Still no joy.

Made the edits, but still get the error

GRUB loading stage 1.5
GRUB loading please wait
Error 15

I don't understand where GRUB is coming from since I thought Slackware
used LILO. Any thoughts, please?

What I have done is to modify the linuxrc and load_kernel_modules
files since mkinitrd didn't work.

I have added the lines
ehci-hcd
usb-storage
scsi_mod
sd_mod
to the list of modules (not sure if this is correct since the comment
line in the file suggested insmod MODULE.ko)

I then added
/bin/insmod usbcore
...
...
sleep 5s

to the linuxrc script, before gzipping the initrd & copying it back to
/boot (I copied sleep into the bin in initrd since this wasn't
available)

I tried to run liloconfig, but this didn't do anything - couldn't find
it on sda1 even though it is there !?


Where is GRUB coming from since I never installed it...?

gnashley 04-24-2006 01:14 AM

As I mentioned, th initrd created by mkinitrd will not work anyway since it doesn't provide a sleep time.
Have a look at the initrd for RUNT which does what you want.


All times are GMT -5. The time now is 08:34 AM.