linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Using cramfs as root filesystem on diskless machine
@ 2001-06-15 13:35 Alexandr Andreev
       [not found] ` <14506.992621390@redhat.com>
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Alexandr Andreev @ 2001-06-15 13:35 UTC (permalink / raw)
  To: linux-kernel

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.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Using cramfs as root filesystem on diskless machine
       [not found] ` <14506.992621390@redhat.com>
@ 2001-06-15 17:16   ` Alexandr Andreev
  0 siblings, 0 replies; 11+ messages in thread
From: Alexandr Andreev @ 2001-06-15 17:16 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-kernel

Hi, David.
David Woodhouse wrote:

>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=y
CONFIG_BLK_DEV_RAM_SIZE=8192
CONFIG_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?


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Using cramfs as root filesystem on diskless machine
  2001-06-15 13:35 Using cramfs as root filesystem on diskless machine Alexandr Andreev
       [not found] ` <14506.992621390@redhat.com>
@ 2001-06-15 18:27 ` David L. Parsley
  2001-06-19 13:24   ` Alexandr Andreev
  2001-06-17 16:28 ` Pavel Machek
  2 siblings, 1 reply; 11+ messages in thread
From: David L. Parsley @ 2001-06-15 18:27 UTC (permalink / raw)
  To: Alexandr Andreev; +Cc: linux-kernel

Mathias Killian wrote a patch to allow cramfs initrd's, see:
http://www.cs.helsinki.fi/linux/linux-kernel/2001-01/1064.html

Alexandr Andreev wrote:
> 
> 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.
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
David L. Parsley
Network Administrator, Roanoke College
"If I have seen further it is by standing on ye shoulders of
Giants."
--Isaac Newton

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Using cramfs as root filesystem on diskless machine
  2001-06-15 13:35 Using cramfs as root filesystem on diskless machine Alexandr Andreev
       [not found] ` <14506.992621390@redhat.com>
  2001-06-15 18:27 ` David L. Parsley
@ 2001-06-17 16:28 ` Pavel Machek
  2 siblings, 0 replies; 11+ messages in thread
From: Pavel Machek @ 2001-06-17 16:28 UTC (permalink / raw)
  To: Alexandr Andreev, linux-kernel

Hi!

> 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...
-- 
I'm pavel@ucw.cz. "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents at discuss@linmodems.org

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Using cramfs as root filesystem on diskless machine
  2001-06-15 18:27 ` David L. Parsley
@ 2001-06-19 13:24   ` Alexandr Andreev
  2001-06-19 14:04     ` David L. Parsley
  0 siblings, 1 reply; 11+ messages in thread
From: Alexandr Andreev @ 2001-06-19 13:24 UTC (permalink / raw)
  To: David L. Parsley; +Cc: linux-kernel

David L. Parsley wrote:

>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?



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Using cramfs as root filesystem on diskless machine
  2001-06-19 13:24   ` Alexandr Andreev
@ 2001-06-19 14:04     ` David L. Parsley
  2001-06-19 15:08       ` how to display proxy arp addresses using "ip neigh" from iproute2 Christopher Friesen
  2001-06-19 15:44       ` Using cramfs as root filesystem on diskless machine Alexandr Andreev
  0 siblings, 2 replies; 11+ messages in thread
From: David L. Parsley @ 2001-06-19 14:04 UTC (permalink / raw)
  To: Alexandr Andreev; +Cc: linux-kernel

Alexandr Andreev wrote:
> 
> David L. Parsley wrote:
> 
> >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
                                              ^^^^^
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
-- 
David L. Parsley
Network Administrator, Roanoke College
"If I have seen further it is by standing on ye shoulders of
Giants."
--Isaac Newton

^ permalink raw reply	[flat|nested] 11+ messages in thread

* how to display proxy arp addresses using "ip neigh" from iproute2
  2001-06-19 14:04     ` David L. Parsley
@ 2001-06-19 15:08       ` Christopher Friesen
  2001-06-21  5:16         ` Bernd Eckenfels
  2001-06-19 15:44       ` Using cramfs as root filesystem on diskless machine Alexandr Andreev
  1 sibling, 1 reply; 11+ messages in thread
From: Christopher Friesen @ 2001-06-19 15:08 UTC (permalink / raw)
  To: linux-kernel


I 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

-- 
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: cfriesen@nortelnetworks.com

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Using cramfs as root filesystem on diskless machine
  2001-06-19 14:04     ` David L. Parsley
  2001-06-19 15:08       ` how to display proxy arp addresses using "ip neigh" from iproute2 Christopher Friesen
@ 2001-06-19 15:44       ` Alexandr Andreev
  2001-06-19 16:36         ` Stephane Casset
  1 sibling, 1 reply; 11+ messages in thread
From: Alexandr Andreev @ 2001-06-19 15:44 UTC (permalink / raw)
  To: David L. Parsley; +Cc: linux-kernel

David L. Parsley wrote

>>...
>>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:

 >  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.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Using cramfs as root filesystem on diskless machine
  2001-06-19 15:44       ` Using cramfs as root filesystem on diskless machine Alexandr Andreev
@ 2001-06-19 16:36         ` Stephane Casset
  0 siblings, 0 replies; 11+ messages in thread
From: Stephane Casset @ 2001-06-19 16:36 UTC (permalink / raw)
  To: Alexandr Andreev; +Cc: David L. Parsley, linux-kernel

Le Tue, Jun 19, 2001 at 07:44:52PM +0400, Alexandr Andreev écrivait :
> 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
-- 
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  casset@logidee.com
F-67080 STRASBOURG Cedex 3        Fax : +33 388 23 70 00  http://logidee.com

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: how to display proxy arp addresses using "ip neigh" from iproute2
  2001-06-19 15:08       ` how to display proxy arp addresses using "ip neigh" from iproute2 Christopher Friesen
@ 2001-06-21  5:16         ` Bernd Eckenfels
  0 siblings, 0 replies; 11+ messages in thread
From: Bernd Eckenfels @ 2001-06-21  5:16 UTC (permalink / raw)
  To: linux-kernel

In article <3B2F6ADA.C2AD0304@nortelnetworks.com> 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Using cramfs as root filesystem on diskless machine
       [not found] <Pine.LNX.4.33.0106151824240.28914-100000@imladris.demon.co.uk>
@ 2001-06-15 17:35 ` Alexandr Andreev
  0 siblings, 0 replies; 11+ messages in thread
From: Alexandr Andreev @ 2001-06-15 17:35 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-kernel

David Woodhouse wrote:

>It's not polite to respond to private messages in public fora.
>
>On Fri, 15 Jun 2001, Alexandr Andreev wrote:
>
>>Bootloader only jumps to the kernel entry point. The initrd image is 
>>compiled inside the kernel.
>>
>
>So it's in a ROM or flash chip? Why copy it into memory then? We have 
>support for ROM and flash chips.
>
No any flash, disk, floppy... only RAM, image is inside kernel.
#ls -s vmlinux
4852 vmlinux
#objdump --headers vmlinux
.data
.text
.bss
.initrd <- Here is the image.
...



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2001-06-21  5:16 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-15 13:35 Using cramfs as root filesystem on diskless machine Alexandr Andreev
     [not found] ` <14506.992621390@redhat.com>
2001-06-15 17:16   ` Alexandr Andreev
2001-06-15 18:27 ` David L. Parsley
2001-06-19 13:24   ` Alexandr Andreev
2001-06-19 14:04     ` David L. Parsley
2001-06-19 15:08       ` how to display proxy arp addresses using "ip neigh" from iproute2 Christopher Friesen
2001-06-21  5:16         ` Bernd Eckenfels
2001-06-19 15:44       ` Using cramfs as root filesystem on diskless machine Alexandr Andreev
2001-06-19 16:36         ` Stephane Casset
2001-06-17 16:28 ` Pavel Machek
     [not found] <Pine.LNX.4.33.0106151824240.28914-100000@imladris.demon.co.uk>
2001-06-15 17:35 ` Alexandr Andreev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).