View previous topic :: View next topic |
Author |
Message |
knopper Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 20 Apr 2002 Posts: 106 Location: The Netherlands
|
Posted: Fri Aug 27, 2004 8:05 am Post subject: Using an USB disk as root fs. |
|
|
Hi all,
I'm currently working on a small busybox/uclibc based rescue system which can be found here: http://www.knopper.tk/projects/
Though now I'm looking for a way to boot with a usual floppy and then use an USB disk as root fs. So I made an initrd with the proper modules in it (using 2.6 kernel) and all this gets loaded correctly since in recognizes the usb disk and shows the partition table.
The failure comes when the kernel tries to mount the root fs, it gives this output:
Code: |
mount: error 6 mounting ext2
pivotroot: pivot_root failed 2
can't unmount /initrd/proc
|
I made a directory called "initrd" on the usb disk and just te be sure also on the floppy disk, this doesn't help.
Here's my grub.conf :
Code: |
# By default, boot the first entry.
default 0
timeout 15
title Knopperdisk
root (fd0)
kernel /kernel-2.6.8.1 root=sda1 vga=791
initrd /initrd-2.6.8.1
|
The root variable is correct, I know for sure since it shows the partition table of the usb disk at boot.
Does anyone have any idea what I might be doing wrong?
Of course there's ext2 support directly compiled into the kernel and I formatted the usb disk as ext2. (after I cleared it with dd if=/dev/zero of=/dev/sda) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
knopper Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 20 Apr 2002 Posts: 106 Location: The Netherlands
|
Posted: Fri Aug 27, 2004 10:55 am Post subject: |
|
|
anybody?
I've tried to make the initrd both with pivot and without. They both give the same error. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
smart Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 19 Nov 2002 Posts: 455
|
Posted: Fri Aug 27, 2004 1:53 pm Post subject: |
|
|
I think its not related to initrd or usb, but proc instead. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
jdong n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 01 Mar 2004 Posts: 41
|
Posted: Fri Aug 27, 2004 2:57 pm Post subject: |
|
|
your kernel line should have root=/dev/sda1, not just sda1 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
knopper Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 20 Apr 2002 Posts: 106 Location: The Netherlands
|
Posted: Fri Aug 27, 2004 5:05 pm Post subject: |
|
|
That was a typo, the problem was that there was not device called "sda1" in the initrd dev directory. So I mounted it as loopback device and made it myself. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Nate_S Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Monkey Island/Monkey_Island_-_Monkey.gif)
Joined: 18 Mar 2004 Posts: 414
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
knopper Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 20 Apr 2002 Posts: 106 Location: The Netherlands
|
Posted: Fri Aug 27, 2004 6:20 pm Post subject: |
|
|
I forgot to mention that besides create the right device block in /dev of the initrd image I also changed "/dev/root" to the right device in the "linuxrc" script. Actually I found thesame websites...
Thanks anyway! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|