Hi all I'm trying to boot with initramfs I build my own root fs, and the kernel build links it, I have double checked this when the kernel boots unpack_to_rootfs() returns no error, so it continues and .... when It tries to mount the rootfs it tries to mount from an IDE device (where the kernel was built from), and not from the initramfs "image" I think this is not documented and I did not found it by gooling any comment will be greatly appreciated Thanks in advance Ulisses Debian GNU/Linux: a dream come true ----------------------------------------------------------------------------- "Computers are useless. They can only give answers." Pablo Picasso ---> Visita http://www.valux.org/ para saber acerca de la <--- ---> Asociaci?n Valenciana de Usuarios de Linux <---
uaca@alumni.uv.es
2003-Nov-04 08:40 UTC
[klibc] boot parameter needed to load the initramfs?
independently of the image I include the kernel mounts as the root device the partition where It was built and not the initramfs image included (I have verified it with nm) I have looked at the source again but I found nothing... How to debug this proces? Thanks Ulisses On Sun, Nov 02, 2003 at 05:59:25PM +0100, uaca@alumni.uv.es wrote:> > Hi all > > I'm trying to boot with initramfs > > I build my own root fs, and the kernel build links it, I have > double checked this > > when the kernel boots unpack_to_rootfs() returns no error, so > it continues and .... > > when It tries to mount the rootfs it tries to mount from > an IDE device (where the kernel was built from), and not from > the initramfs "image" > > I think this is not documented and I did not found it by gooling > > any comment will be greatly appreciated > > Thanks in advance > > Ulisses > > Debian GNU/Linux: a dream come true > ----------------------------------------------------------------------------- > "Computers are useless. They can only give answers." Pablo Picasso > > ---> Visita http://www.valux.org/ para saber acerca de la <--- > ---> Asociaci?n Valenciana de Usuarios de Linux <--- > > _______________________________________________ > klibc mailing list > klibc@zytor.com > http://www.zytor.com/mailman/listinfo/klibc-- Debian GNU/Linux: a dream come true ----------------------------------------------------------------------------- "Computers are useless. They can only give answers." Pablo Picasso ---> Visita http://www.valux.org/ para saber acerca de la <--- ---> Asociaci?n Valenciana de Usuarios de Linux <---
On Sun, 2003-11-02 at 08:59, uaca@alumni.uv.es wrote:> when It tries to mount the rootfs it tries to mount from > an IDE device (where the kernel was built from), and not from > the initramfs "image"The initramfs filesystem is already "mounted" before the IDE drive gets mounted. You have to hack some of the init code to force it to not mount anything, then it will drop into initramfs. <b
On Sun, 2 Nov 2003 uaca@alumni.uv.es wrote:> I'm trying to boot with initramfs[...]> when It tries to mount the rootfs it tries to mount from > an IDE device (where the kernel was built from), and not from > the initramfs "image"Last I checked, a stock kernel does not yet allow you to boot into initramfs. It always tries to mount some other root filesystem instead.> I think this is not documented and I did not found it by goolingIt's been mentioned a couple of times in this list, but I think you're right that most people don't find out about it until they actually try to use initramfs :-). Some patches have been floating around to fix this, but I don't know if any of them are considered authoritative. You need to stop the kernel from calling mount_root. One simple approach is to modify the "prepare_namespace" function in "init/do_mounts.c". Replace the call to "mount_root();" with this: if((MAJOR(ROOT_DEV) != 0) || (MINOR(ROOT_DEV) != 0)) mount_root(); Then if you boot with "root=0:0" on the kernel command line, it should go directly into initramfs. I don't have my patched source handy but the above is what I seem to remember doing. -Dave Dodge
Hi Dave On Tue, Nov 04, 2003 at 12:58:16PM -0500, Dave Dodge wrote: [...]> "init/do_mounts.c". Replace the call to "mount_root();" with this:To try it out I did just comment that line :-) and it worked like a charm Thanks so much Ulisses Debian GNU/Linux: a dream come true ----------------------------------------------------------------------------- "Computers are useless. They can only give answers." Pablo Picasso ---> Visita http://www.valux.org/ para saber acerca de la <--- ---> Asociaci?n Valenciana de Usuarios de Linux <---
how can I debug the initramfs process? As I posted previously the system tries to boot , It seems as it did not include the gziped cpio (newc) archive, but I have checked this in the vmlinux image On Sun, Nov 02, 2003 at 05:59:25PM +0100, uaca@alumni.uv.es wrote:> > Hi all > > I'm trying to boot with initramfs > > I build my own root fs, and the kernel build links it, I have > double checked this > > when the kernel boots unpack_to_rootfs() returns no error, so > it continues and .... > > when It tries to mount the rootfs it tries to mount from > an IDE device (where the kernel was built from), and not from > the initramfs "image" > > I think this is not documented and I did not found it by gooling > > any comment will be greatly appreciated > > Thanks in advance > > Ulisses > > Debian GNU/Linux: a dream come true > ----------------------------------------------------------------------------- > "Computers are useless. They can only give answers." Pablo Picasso > > ---> Visita http://www.valux.org/ para saber acerca de la <--- > ---> Asociaci?n Valenciana de Usuarios de Linux <--- > > _______________________________________________ > klibc mailing list > klibc@zytor.com > http://www.zytor.com/mailman/listinfo/klibc-- Debian GNU/Linux: a dream come true ----------------------------------------------------------------------------- "Computers are useless. They can only give answers." Pablo Picasso ---> Visita http://www.valux.org/ para saber acerca de la <--- ---> Asociaci?n Valenciana de Usuarios de Linux <---