finish auto-installing without initrd?
Hi, my target doesn't normally boot with an initrd. Is is possible to get autoyast working without an initrd on the initial boot of an auto-installed systed? Or for auto-installing do I need to do the initial boot (after installing) with initrd so it will kick off the last part of the auto install? Brian
Hi, initrd is always needed and without it the system might not boot. If you need things differently, then you have to do alot of customization.. Anas Brian Corriveau wrote:
Hi,
my target doesn't normally boot with an initrd. Is is possible to get autoyast working without an initrd on the initial boot of an auto-installed systed? Or for auto-installing do I need to do the initial boot (after installing) with initrd so it will kick off the last part of the auto install?
Brian
Anas Nashif wrote
Hi, initrd is always needed and without it the system might not boot. If you need things differently, then you have to do alot of customization..
Not really: If Brain is already using a custom kernel, then he just needs to compile all needed modules into the kernel, which will already be used on the first reboot. That's actually what we do. The important thing is just to remove the "INITRD_MODULES" line in /etc/sysconfig/kernel in a post script before AY writes the bootloader config. Because then AY will detect it does not need any initrd modules and not create an initrd. We need a lot of modules during autoinstall and load them through "insmod" lines in the info file (because I wasn't able to get a kernel 2.6 into AY from SuSE 9.0 :-)), but then we install our "all drivers compiled in" kernel 2.6 rpm and remove the INITRD_MODULES line. Although I wonder why it is so important to get rid of the initrd on the first reboot... cu, Frank -- Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/ Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/ LMU, Amalienstr. 17 Phone: +49 89 2180-4049 80333 Muenchen, Germany Fax: +49 89 2180-99-4049 * Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. *
Hi, Frank Steiner wrote:
Anas Nashif wrote
Hi, initrd is always needed and without it the system might not boot. If you need things differently, then you have to do alot of customization..
Not really: If Brain is already using a custom kernel, then he just needs to compile all needed modules into the kernel, which will already be used on the first reboot. That's actually what we do. The important thing is just to remove the "INITRD_MODULES" line in /etc/sysconfig/kernel in a post script before AY writes the bootloader config. Because then AY will detect it does not need any initrd modules and not create an initrd.
True, and that is what I mean with customization :) (...) Anas
cu, Frank
Thanks for the help Frank. My understanding is the first reboot is special because auto-installation finishes things up. I was wondering if the file system in initrd was required or had hooks somehow for this to execute. It sounds like this is not required by auto-install. Susequent reboots then act normally. You are correct that my kernel does work fine without an initrd (isn't that what I said???). I am trying to save some cleanup and an extra reboot when installing a target system (booting without an initrd would be required to verify normal system operation). After installation any initrd hanging around would never be used. This is not critical, but it is good to know how I can customize things so that an initrd is not built unnecessarily. On Wednesday 08 December 2004 11:29 pm, Frank Steiner wrote:
Anas Nashif wrote
Hi, initrd is always needed and without it the system might not boot. If you need things differently, then you have to do alot of customization..
Not really: If Brain is already using a custom kernel, then he just needs to compile all needed modules into the kernel, which will already be used on the first reboot. That's actually what we do. The important thing is just to remove the "INITRD_MODULES" line in /etc/sysconfig/kernel in a post script before AY writes the bootloader config. Because then AY will detect it does not need any initrd modules and not create an initrd. We need a lot of modules during autoinstall and load them through "insmod" lines in the info file (because I wasn't able to get a kernel 2.6 into AY from SuSE 9.0 :-)), but then we install our "all drivers compiled in" kernel 2.6 rpm and remove the INITRD_MODULES line.
Although I wonder why it is so important to get rid of the initrd on the first reboot...
cu, Frank
On Wednesday 08 December 2004 11:29 pm, Frank Steiner wrote:
That's actually what we do. The important thing is just to remove the "INITRD_MODULES" line in /etc/sysconfig/kernel in a post script before AY writes the bootloader config. Because then AY will detect it does not need any initrd modules and not create an initrd.
I tried putting in a chroot postscript that runs before the bootloader is written, but the autoinstaller still seems to insist on writing out an initrd. In fact it has a nasty habit of locking up without any error messages when writing out the "boot manager" from time to time. My kernel boots and runs fine without an initrd so you can imagine this doesn't make me very happy to see that part mess up the install. The postscript puts a # in front of the INITRD_MODULES. When I log at the setup.log I can set that the post script ran and put the # in because I cat the file after modifying it. What is really strange is that the /etc/sysconfig/kernel in the installed system the line is uncommented and has a module in it. Is there something else I need to do to not build an initrd? # cat setup.log + perl -pi -e s/INITRD_MODULES/#INITRD_MODULES/ /etc/sysconfig/kernel + head /etc/sysconfig/kernel ## Path: System/Kernel ## Description: ## Type: string ## Command: /sbin/mkinitrd # # This variable contains the list of modules to be added to the initial # ramdisk by calling the script "mk_initrd" # (like drivers for scsi-controllers, for lvm or reiserfs) # #INITRD_MODULES="" ... thanks Brian
Hi! Dne středa 15 prosinec 2004 03:31 Brian Corriveau napsal(a):
On Wednesday 08 December 2004 11:29 pm, Frank Steiner wrote:
That's actually what we do. The important thing is just to remove the "INITRD_MODULES" line in /etc/sysconfig/kernel in a post script before AY writes the bootloader config. Because then AY will detect it does not need any initrd modules and not create an initrd.
I tried putting in a chroot postscript that runs before the bootloader is written, but the autoinstaller still seems to insist on writing out an initrd. In fact it has a nasty habit of locking up without any error messages when writing out the "boot manager" from time to time. My kernel boots and runs fine without an initrd so you can imagine this doesn't make me very happy to see that part mess up the install. The postscript puts a # in front of the INITRD_MODULES. When I log at the setup.log I can set that the post script ran and put the # in because I cat the file after modifying it. What is really strange is that the /etc/sysconfig/kernel in the installed system the line is uncommented and has a module in it. Is there something else I need to do to not build an initrd?
The variable INITRD_MODULES is written by YaST just before bootloader is being installed (so that all modules that were discovered as needed in initrd just before bootloader is written are there). This is why your changes get rewritten. As the easiest solution I see modifying the /sbin/mkinitrd script via a postscript, so that it doesn't create any initrd. -- Regards, Jiri Srain YaST2 developer --------------------------------------------------------------------- SuSE CR, s.r.o. e-mail: jsrain@suse.cz Drahobejlova 27 tel: +420 2 9654 2373 190 00 Praha 9 fax: +420 2 9654 2374 Czech Republic http://www.suse.cz
Hi, I'm looking at some source files for this stuff and it seems the key may be in this: //-------------------------------------------------------------- // Install bootloader (always, see #23018) // should also set Misc::boot_msg appropriate if ( !Mode::live_eval ) { Bootloader::Write (); } live_eval is used in a bunch of places in the yast2-installation sources so I'm thinking there may be more to it than just the mkinitrd part. Oh and if only the mkinitrd needs to be changed that's not with a chrooted script right?
As the easiest solution I see modifying the /sbin/mkinitrd script via a postscript, so that it doesn't create any initrd.
--
thanks Brian
Hi! Dne středa 15 prosinec 2004 21:14 Brian Corriveau napsal(a):
Hi,
I'm looking at some source files for this stuff and it seems the key may be in this: //-------------------------------------------------------------- // Install bootloader (always, see #23018) // should also set Misc::boot_msg appropriate if ( !Mode::live_eval ) { Bootloader::Write (); }
This call does the complete bootloader installation including creation of initrd. BTW: I found out deep between other my thoughts, that even if the sysconfig variable is empty, an initrd may be created, because - mkinitrd also detects modules which may be needed - graphical splashscreen is also part of mkintrd So I think the only ways to fix it for SLES9 are either patch the installation system, or (the cleaner, as I suggested) to modify /sbin/mkinitrd script via a postscript.
live_eval is used in a bunch of places in the yast2-installation sources so I'm thinking there may be more to it than just the mkinitrd part. Oh and if only the mkinitrd needs to be changed that's not with a chrooted script right?
As the easiest solution I see modifying the /sbin/mkinitrd script via a postscript, so that it doesn't create any initrd.
--
thanks Brian
-- Regards, Jiri Srain YaST2 developer --------------------------------------------------------------------- SuSE CR, s.r.o. e-mail: jsrain@suse.cz Drahobejlova 27 tel: +420 2 9654 2373 190 00 Praha 9 fax: +420 2 9654 2374 Czech Republic http://www.suse.cz
On Thursday 16 December 2004 2:28 am, Jiri Srain wrote:
BTW: I found out deep between other my thoughts, that even if the sysconfig variable is empty, an initrd may be created, because - mkinitrd also detects modules which may be needed - graphical splashscreen is also part of mkintrd
So I think the only ways to fix it for SLES9 are either patch the installation system, or (the cleaner, as I suggested) to modify /sbin/mkinitrd script via a postscript.
Thanks for the pointers. I figured out that I needed a chroot post-install script executed before the boot loader is installed. I just re-write the script to only have exit 0. I initially missed the fine print saying that I had to prefix the path with /mnt. So now I have no initrd being created! Brian
participants (4)
-
Anas Nashif
-
Brian Corriveau
-
Frank Steiner
-
Jiri Srain