Using cramfs as root filesystem on diskless machine
Hi, list.
My MIPS machine has no any disks or flopies. So i obliged to use a RAM disk with a file system on it, which is mounted as root.
I use gzipped initrd image, which is linked to the special section in the kernel during compilation. Now, the RAM disk size is really big, so i decide to use cramfs instead of ext2. In scripts/cramfs/ I found an utility that creates cramfs file system image. But i read in rd.c, that RAM disk driver doesn't support the cramfs.
After i create an image, how can i mount it as root file system? Where i must put it? Which kernel command line options i must use?
Please answer, or point me to any documentation or mailing list.
Hi, David.
Quoted 2 lines · David Woodhouse
Where does the bootloader get the initrd from?
Bootloader only jumps to the kernel entry point. The initrd image is compiled inside the kernel. ( special section in the ELF kernel binary ) .config:
...CONFIG_BLK_DEV_RAM=yCONFIG_BLK_DEV_RAM_SIZE=8192CONFIG_BLK_DEV_INITRD=y
...
If 'root=/dev/ram' option is set in command line, the root file system will bi in RAM. When the linux kernel is booting, it tries to identify_ramdisk_image() ( at drivers/block/rd.c ). So it can only understand ext2, minix, romfs, and gzipped images. But what about cramfs? How can i use a cramfs image to mount it as my root file system? Is any patches to the rd.c requiried?
Mathias Killian wrote a patch to allow cramfs initrd's, see:
http://www.cs.helsinki.fi/linux/linux-kernel/2001-01/1064.html
Quoted 22 lines · Alexandr Andreev
Hi, list.
My MIPS machine has no any disks or flopies. So i obliged to use a RAM disk with a file system on it, which is mounted as root.
I use gzipped initrd image, which is linked to the special section in the kernel during compilation. Now, the RAM disk size is really big, so i decide
to use cramfs instead of ext2. Inscripts/cramfs/I found an utility that creates cramfs file system image. But i read inrd.c, that RAM disk driver doesn't support the cramfs.After i create an image, how can i mount it as root file system? Where i must put it? Which kernel command line options i must use?
Please answer, or point me to any documentation or mailing list.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Signature · 5 lines
David L. Parsley Network Administrator, Roanoke College "If I have seen further it is by standing on ye shoulders of Giants." --Isaac Newton
Hi!
Quoted 2 lines
My MIPS machine has no any disks or flopies. So i obliged to use a RAM disk with a file system on it, which is mounted as root.
What machine is that? Some kind of handheld?
Pavel
PS: linux-vr list seems dead, right? It would be probably really usefull to get replacement...
Signature · 2 lines
I'm [email protected]. "In my country we have almost anarchy and I don't care." Panos Katsaloulis describing me w.r.t. patents at [email protected]
Quoted 3 lines · David L. Parsley
Mathias Killian wrote a patch to allow cramfs initrd's, see:
http://www.cs.helsinki.fi/linux/linux-kernel/2001-01/1064.html
Thank you. I applied this patch, and recompiled my kernel.
All works fine, if the size of root filesystem less than 4096Kb. But when i create
an image of root filesystem which size is bigger than 4096Mb, the kernel said:
...
RAMDISK driver initialized: 16 RAM disks of 4096K size 4096 blocksize
...
RAMDISK: cramfs filesystem found at block 0 RAMDISK: Loading 2300 blocks [1 disk] into ram disk... done.
...
Freeing unused kernel memory: 116k freed Algorithmics/MIPS FPU Emulator v1.4
Error -3 while decompressing! 804172a4(-166740)->803da000(4096) bash#
As you can see, the size of image is only 2300kb. The kernel command line is:
root=/dev/ram init=/bin/bash ramdisk_blocksize=4096
When i tried to mount this image on a running kernel it is all OK.
# mount -o loop -t cramfs cramfsdisk.bin /mnt/ramdisk # chroot /mnt/ramdisk /bin/bash
I already asked Matthias, but he said that he didn't try cramfs for ram disks larger than 4k. Did anybody try it? Does anybody work on cramfs now?
Quoted 6 lines · Alexandr Andreev
Quoted 3 lines · David L. Parsley
Mathias Killian wrote a patch to allow cramfs initrd's, see:
http://www.cs.helsinki.fi/linux/linux-kernel/2001-01/1064.html
Quoted 7 lines
Thank you. I applied this patch, and recompiled my kernel. All works fine, if the size of root filesystem less than 4096Kb. But when i create
an image of root filesystem which size is bigger than 4096Mb, the kernel said:
...
RAMDISK driver initialized: 16 RAM disks of 4096K size 4096 blocksize
^^^^^
You also need to give the kernel 'ramdisk_size=XXXX'. I've used larger cramfs initrd's with no problem, but the kernel has to make larger ramdisks. By editing rd.c, you can make this stuff default.
regards,
David
Signature · 5 lines
David L. Parsley Network Administrator, Roanoke College "If I have seen further it is by standing on ye shoulders of Giants." --Isaac Newton
how to display proxy arp addresses using "ip neigh" from iproute2
In reply to Alexandr AndreevI have a small question. I have an explicit proxy arp address added to the arp cache using the command "ip neigh add proxy 47.129.82.116 dev eth1"
Using the old-style "arp -n" command I get the following output:
Address HWtype HWaddress Flags Mask Iface 47.129.82.1 ether 00:E0:16:6C:79:42 C eth0 47.129.82.95 ether 00:20:78:07:E6:A0 C eth0 47.129.82.116 * * MP eth0
However, if I use the new-style command "ip neigh show" I get:
47.129.82.1 dev eth0 lladdr 00:e0:16:6c:79:42 nud reachable 47.129.82.95 dev eth0 lladdr 00:20:78:07:e6:a0 nud delay
How can I see what I've got set for proxy arps using the "ip neigh" command?
Help!
Chris
Signature · 4 lines
Chris Friesen | MailStop: 043/33/F10 Nortel Networks | work: (613) 765-0557 3500 Carling Avenue | fax: (613) 765-2986 Nepean, ON K2H 8E9 Canada | email: [email protected]
Re: how to display proxy arp addresses using "ip neigh" from iproute2
Quoted 1 line · In article <[email protected]> you wrote:
47.129.82.116 * * MP eth0
the asteriks simply show you, that the new linuix kernel will not be able to remeber any mac address for a proxy arp entry. It will always respond with the device' own MAC address. Can't find a way to display it with ip, "ip neigh show nud all" will not show them, too.
Greetings
Bernd
David L. Parsley wrote
Quoted 11 lines
Quoted 3 lines
...
RAMDISK driver initialized: 16 RAM disks of 4096K size 4096 blocksize^^^^^You also need to give the kernel 'ramdisk_size=XXXX'. I've used larger cramfs initrd's with no problem, but the kernel has to make larger ramdisks. By editing
rd.c, you can make this stuff default.regards,
David
My cramfs ramdisk size is less then 4096, it is only 2304Kb. Matthias Kilian wrote me in the private letter:
Quoted 2 lines
The cramfs does uncompression on the fly, i.e. on each file access. This means that the ramdisk in your example actually uses 2304 k RAM.
And besides, i have been tried this option already.
But, thank you anyway, now i know that big cramfs initrd`s works. Possibly, some symlinks are broken, or some libraries are missed, on my rootfs... But it is very strange, that ext2fs ramdisk image works with the same rootfs on it. I'll try to investigate it by myself.
Regards.
Le Tue, Jun 19, 2001 at 07:44:52PM +0400, Alexandr Andreev écrivait :
Quoted 7 lines
David L. Parsley wrote
Possibly, some symlinks are broken, or some libraries are missed, on my rootfs...
But it is very strange, that ext2fs ramdisk image works with the same rootfs on it.
I'll try to investigate it by myself.
I have almost the same problem, I am using a cramfs root filesystem, not a ramdisk cramfs. When I use the very same content on ext2 mounted read-only everything work as expected, but with cramfs some daemons don't start (mingetty for example)...
I mount tmpfs in /tmp and files touched in /var are symlinks to files in /tmp...
I don't have a clue of what goes wrong, hints a more than welcome ;)
linux is 2.4.5-ac15+patch for cramfs by Daniel Quinlan+Mathias Killian (http://www.cs.helsinki.fi/linux/linux-kernel/2001-01/1064.html)
Regards,
Sept
Signature · 3 lines
Stéphane Casset LOGIDÉE sàrl Se faire plaisir d'apprendre 3, quai Kléber, Tour Sébastopol Tel : +33 388 23 69 77 [email protected] F-67080 STRASBOURG Cedex 3 Fax : +33 388 23 70 00 http://logidee.com