Re: Using cramfs as root filesystem on diskless machine

2001-06-19 Thread Stephane Casset

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  [EMAIL PROTECTED]
F-67080 STRASBOURG Cedex 3Fax : +33 388 23 70 00  http://logidee.com
-
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/



Re: Using cramfs as root filesystem on diskless machine

2001-06-19 Thread Alexandr Andreev

David L. Parsley wrote

>>...
>>RAMDISK driver initialized: 16 RAM disks of 4096K size 4096 blocksize
>>
>  ^
>You also need to give the kernel 'ramdisk_size='.  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.

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



Re: Using cramfs as root filesystem on diskless machine

2001-06-19 Thread David L. Parsley

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='.  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
-
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/



Re: Using cramfs as root filesystem on diskless machine

2001-06-19 Thread Alexandr Andreev

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?


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



Re: Using cramfs as root filesystem on diskless machine

2001-06-19 Thread Alexandr Andreev

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?


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



Re: Using cramfs as root filesystem on diskless machine

2001-06-19 Thread David L. Parsley

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='.  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
-
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/



Re: Using cramfs as root filesystem on diskless machine

2001-06-19 Thread Alexandr Andreev

David L. Parsley wrote

...
RAMDISK driver initialized: 16 RAM disks of 4096K size 4096 blocksize

  ^
You also need to give the kernel 'ramdisk_size='.  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.

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



Re: Using cramfs as root filesystem on diskless machine

2001-06-19 Thread Stephane Casset

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  [EMAIL PROTECTED]
F-67080 STRASBOURG Cedex 3Fax : +33 388 23 70 00  http://logidee.com
-
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/



Re: Using cramfs as root filesystem on diskless machine

2001-06-17 Thread Pavel Machek

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 [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]
-
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/



Re: Using cramfs as root filesystem on diskless machine

2001-06-17 Thread Pavel Machek

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 [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]
-
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/



Re: Using cramfs as root filesystem on diskless machine

2001-06-15 Thread 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

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 [EMAIL PROTECTED]
> 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
-
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/



Re: Using cramfs as root filesystem on diskless machine

2001-06-15 Thread Alexandr Andreev

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


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



Re: Using cramfs as root filesystem on diskless machine

2001-06-15 Thread Alexandr Andreev

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?

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



Using cramfs as root filesystem on diskless machine

2001-06-15 Thread 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. 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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Using cramfs as root filesystem on diskless machine

2001-06-15 Thread 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. 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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: Using cramfs as root filesystem on diskless machine

2001-06-15 Thread Alexandr Andreev

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?

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



Re: Using cramfs as root filesystem on diskless machine

2001-06-15 Thread Alexandr Andreev

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


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



Re: Using cramfs as root filesystem on diskless machine

2001-06-15 Thread 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

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 [EMAIL PROTECTED]
 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
-
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/