LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-09-2002, 11:47 AM   #1
cam2k
LQ Newbie
 
Registered: Dec 2002
Posts: 6

Rep: Reputation: 0
root fs


I can't load a compressed root file system on floppy disk when a Kernel (2.4.19) tell me to insert a floppy!
But i succeed when i try to load with uncompressed file system!

Probably, i must enable some feature in the kernel.
currently, i have following support built-in:

- ext2
- floppy disk
- ram disk (5000 k)
- inird (i think is not useful)

PS: i don't have enabled a module support

Thank you for support

Luca
 
Old 12-09-2002, 02:37 PM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
what are you using? rdev??

how are you compressing the fs? gzip??

what commands do you use to setup the kernel's ramdisk work?

what are the errors?

you need to specify the device

such as /dev/fd0u1760


Last edited by DavidPhillips; 12-09-2002 at 02:39 PM.
 
Old 12-09-2002, 02:45 PM   #3
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
I think it's this
#
# File systems
#
CONFIG_ZLIB_FS_INFLATE=y
 
Old 12-10-2002, 04:09 AM   #4
cam2k
LQ Newbie
 
Registered: Dec 2002
Posts: 6

Original Poster
Rep: Reputation: 0
I think it's this
#
# File systems
#
CONFIG_ZLIB_FS_INFLATE=y

I have verified in my config and the value is set to y


what are you using? rdev??
yes, i've used:
rdev bzImage /dev/fd0
and:
rdev -R /dev/fd0 0


how are you compressing the fs? gzip??
i've been compressed my root fs with:
dd if=/dev/loop0 bs=1k | gzip -v9 > /dev/fd0


what commands do you use to setup the kernel's ramdisk work?
I don't use any comand to set ramdisk, i've been only compiled the kernel with it's support for ramdisk and set the value at 5000 K

what are the errors?
the error is:
Kernel Panic:VFS:Unable to mount root fs on 02.00
 
Old 12-10-2002, 05:10 AM   #5
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
here is how I do it, not much difference except the rdev, I think that's your problem

kernel ...

dd if=bzImage of=/dev/fd0 bs=1k
rdev /dev/fd0 /dev/fd0
rdev -R /dev/fd0 0
rdev -r /dev/fd0 49152

file system..

dd if=/dev/zero of=rootfs bs=1k count 6192
mke2fs -m 0 -N 3000 rootfs
mount -o loop rootfs /mnt
put files in /mnt
umount /mnt
dd if=rootfs bs=1k | gzip -v9 > rootfs.gz
dd if=rootfs.gz of=/dev/fd0 bs=1k

Last edited by DavidPhillips; 12-10-2002 at 05:17 AM.
 
Old 12-10-2002, 05:15 AM   #6
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
I have one that will not fit on a 1440 disk so I use this

dd if=bzImage of=/dev/fd0 bs=1k
rdev /dev/fd0 /dev/fd0u1760
rdev -R /dev/fd0 0
rdev -r /dev/fd0 49152

dd if=rootfs.gz of=/dev/fd0u1760 bs=1k
 
Old 12-10-2002, 05:20 AM   #7
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
also where I said ramdisk work it was a typo, what I meant was ramdisk word

which is the missing rdev command

it basically sets some bits so that the kernel knows where to look on the disk

it you were using a single floppy it would be calculated to start at the end of the kernel. When using two floppies it's 49152

Last edited by DavidPhillips; 12-10-2002 at 05:23 AM.
 
Old 12-10-2002, 05:29 AM   #8
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
Setting the ramdisk word

Inside the kernel image is the ramdisk word that specifies where the root filesystem is to be found, along with other options. The word can be accessed and set via the rdev command, and its contents are interpreted as follows:

Bit field Description
0-10 Offset to start of ramdisk, in 1024 byte blocks
11-13 unused
14 Flag indicating that ramdisk is to be loaded
15 Flag indicating to prompt before loading rootfs

If bit 15 is set, on boot-up you will be prompted to place a new floppy diskette in the drive. This is necessary for a two-disk boot set.

There are two cases, depending on whether you are building a single boot/root diskette or a double ``boot+root'' diskette set.

1.

If you are building a single disk, the compressed root filesystem will be placed right after the kernel, so the offset will be the first free block (which should be the same as KERNEL_BLOCKS). Bit 14 will be set to 1, and bit 15 will be zero. For example, say you're building a single disk and the root filesystem will begin at block 253 (decimal). The ramdisk word value should be 253 (decimal) with bit 14 set to 1 and bit 15 set to 0. To calculate the value you can simply add the decimal values. 253 + (2^14) = 253 + 16384 = 16637. If you don't quite understand where this number comes from, plug it into a scientific calculator and convert it to binary,
2.

If you are building a two-disk set, the root filesystem will begin at block zero of the second disk, so the offset will be zero. Bit 14 will be set to 1 and bit 15 will be 1. The decimal value will be 2^14 + 2^15 = 49152 in this case.

After carefully calculating the value for the ramdisk word, set it with rdev -r. Be sure to use the decimal value. If you used LILO, the argument to rdev here should be the mounted kernel path, e.g. /mnt/vmlinuz; if you copied the kernel with dd, instead use the floppy device name (e.g., /dev/fd0).

rdev -r KERNEL_OR_FLOPPY_DRIVE VALUE
 
Old 12-11-2002, 04:58 AM   #9
cam2k
LQ Newbie
 
Registered: Dec 2002
Posts: 6

Original Poster
Rep: Reputation: 0
GREAAAAT!!!.... now it's ok! i setup the kernel value to set is ramdisk, in my case (boot + root --> 49152)

rdev -r KERNEL_OR_FLOPPY_DRIVE VALUE

Thanks a lot, and now...Go ahead, because my real experience with the Penguin starts NOW!

Luca
 
Old 12-11-2002, 03:35 PM   #10
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
cool
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RHEL3 Mounting USB after reboot and between reboots: root and non-root users Luis Nunes Linux - Hardware 0 07-20-2005 08:32 AM
IntelliMouse thumb buttons work as root, broken as non-root user, wheel works always digital vortex Linux - Hardware 7 03-02-2004 04:14 PM
root files: create as root:root or root:wheel? pcass Linux - Security 1 02-07-2004 04:14 PM
cant resize root thru rescue, auto mounts root dir absolutal Linux - Newbie 0 06-18-2003 03:06 PM
Why does kppp.desktop require root userid for non-root user? rdaves@earthlink.net Linux - Networking 4 08-27-2001 09:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:23 AM.

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