Skip to contentSkip to conversation

Boot kernel from CD & root fs on ext disc

slackware markus reichelt 1 participant 2 messages Oct 4, 2004 – Oct 7, 2004

lore
Share & tools
lore
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I'm trying to boot a recent kernel (2.4.27 or 2.6.7) from CD with the root fs on external disc (usb). Can't boot off of external devices because of old bios. All needed drivers are compiled in and working, only thing I can't get to work is my prob with initrd described below.

Looking desperately for help on this one.

- ----- Forwarded message from markus reichelt <[email protected]> -----

Date: Mon, 4 Oct 2004 12:25:12 +0000
From: markus reichelt <[email protected]>
To: [email protected]
Subject: Re: [slackware] Boot kernel from CD & root fs on ext disc

Quoted 3 lines · John Briggs

I would first check and see if the scsi module you are using belongs in the second group and if so do an internet search for anyone who may have solved a similar problem.

I managed to create an initrd from scratch, this is what I use as init-script:

#!/bin/bash
mount -t proc /proc /proc
mount -t sysfs none /sys
mount -r -n -t reiserfs /dev/sda10 /mnt
while [ $? -ne 0 ]
do
/bin/mount -r -n -t reiserfs /dev/sda10 /mnt
done
cd /mnt
sleep 1
pivot_root /mnt /loader
umount -f /loader
exec chroot . /sbin/init

This works to some extend; after some seconds /dev/sda10 is available and can be mounted without any further errors. But now I'm stuck again because pivot_root complains about "device or resource busy". Next the kernel panics again ("attempted to kill init!"). I'm lost here, an intensive google search went not as expected, not at all.

Then I tried a different approach and patched a 2.6.7 vanilla kernel with a blkdev_wakeup.patch, that basically repeats the mounting operation after the kernel booted until the provided root=/dev is available. I used the /sbin/makebootdisk script to create a bootdisk with that kernel but unfortunately the code is immature and produces a segfault late in the boot process.

This is killing me...

- --
Bastard Administrator in $hell

- ----- End forwarded message -----

- --
Bastard Administrator in $hell

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFBYU18LMyTO8Kj/uQRAjt7AJ9GyrISp8efkcaqhY4OiewEWsy9lwCffqD3 FTUNrt/vTENi0Qk86ldlJZM=
=6WXU
-----END PGP SIGNATURE-----

#1 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 6 lines · markus reichelt

Then I tried a different approach and patched a 2.6.7 vanilla kernel with a blkdev_wakeup.patch, that basically repeats the mounting operation after the kernel booted until the provided root=/dev is available. I used the /sbin/makebootdisk script to create a bootdisk with that kernel but unfortunately the code is immature and produces a segfault late in the boot process.

I solved the problem with the help of a patch written by Heikki Linnakangas

"howto boot off usb devices, a (mostly step-by-step) guide"

http://mareichelt.de/pub/texts.boot-off-usb.php

- --
Bastard Administrator in $hell

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFBZUriLMyTO8Kj/uQRAg+bAJ4/vLrtJI7seO/GfFywyYrbItiwEACdE2dd XK+LYtk+jPOXKgJyp4k7AAM=
=wyAT
-----END PGP SIGNATURE-----