Netboot Mailing List (by thread)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ram disk trouble (solution)




hi,
    thank for your attention.
    i had a solution about this.
    like this:
    mknbi-linux -x -i rom -d ram -r rootImage.gz -k bzImage -o /tftpdir/bootImage
     kernel image file name     = bzImage
     Output file name              = /tftpdir/bootImage
     Ramdisk image file name = rootImage.gz
     kernel command line       = "auto rw root=/dev/ram nfsroot=kernel nfsaddrs=rom"
so that real_root_dev is /dev/ram and ROOT_DEV is /dev/ram too.
if (mount_initrd && ROOT_DEV != real_root_dev && MAJOR(ROOT_DEV) == RAMDISK_MAJOR && MINOR(ROOT_DEV) == 0) {
    no entry :(
    ......
    pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD)
    ......
}
this is my solution:
    mknbi-linux -x -i rom -d /dev/ram1 -r rootImage.gz -k bzImage -o /tftpdir/bootImage
that's ok.
but i don't know how to change "rw" option to "ro" that is mknbi-linux default.
must to hack the source code ?

----- Original Message ----- 
From: Marty Connor <mdc@thinguin.org>
To: Netboot List <netboot@baghira.han.de>; <jyllyj@163.net>
Sent: Saturday, December 18, 1999 6:33 AM
Subject: Re: ram disk trouble


> 
> On 12/17/1999 5:41 AM jyllyj@163.net jyllyj wrote:
> >look at linux/init/main.c
> >......
> > if (mount_initrd && ROOT_DEV != real_root_dev
> >     && MAJOR(ROOT_DEV) == RAMDISK_MAJOR && MINOR(ROOT_DEV) == 0) {
> >......
> >  );
> >...... 
> >in my case  ROOT_DEV == real_root_dev
> >so it does't exec   pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD);
> >why?  how to? i'm screwing.
> 
> This is somewhat of a guess, but try
> 
>   man rdev
> 
> It says: (in part)
> 
>        In a bootable image for the Linux kernel, there  are  sev-
>        eral  pairs  of  bytes  which specify the root device, the
>        video mode, the size of the RAM disk, and the swap device.
>        These  pairs  of  bytes,  by  default, begin at offset 504
>        (decimal) in the kernel image:
> 
>                498 Root flags
>               (500 and 502 Reserved)
>                504 RAM Disk Size
>                506 VGA Mode
>                508 Root Device
>               (510 Boot Signature)
> 
>        rdev will change these values.
> 
> I get the feeling you need to run rdev on the kernel you are using to set 
> the root device.  If you can explain a little more what you are trying to 
> do, perhaps I/we can be more helpful. 
> 
> Regards,
> 
> Marty
> 
> ---
>    Name: Martin D. Connor
> US Mail: Entity Cyber, Inc.; P.O. Box 391827; Cambridge, MA 02139; USA
>   Voice: (617) 491-6935, Fax: (617) 491-7046 
>   Email: mdc@thinguin.org
>     Web: http://www.thinguin.org/
> 
> 
> ===========================================================================
> This Mail was sent to netboot mailing list by:
> Marty Connor <mdc@thinguin.org>
> To get help about this list, send a mail with 'help' as the only string in
> it's body to majordomo@baghira.han.de. If you have problems with this list,
> send a mail to netboot-owner@baghira.han.de.
> 
===========================================================================
This Mail was sent to netboot mailing list by:
"jyllyj" <jyllyj@163.net>
To get help about this list, send a mail with 'help' as the only string in
it's body to majordomo@baghira.han.de. If you have problems with this list,
send a mail to netboot-owner@baghira.han.de.



For requests or suggestions regarding this mailing list archive please write to netboot@gkminix.han.de.