* newbie question: kexec linux-based bootstrap @ 2009-01-12 11:29 Bizhan Gholikhamseh (bgholikh) 2009-01-12 13:09 ` Sven Anders 2009-01-13 18:41 ` Geoff Levand 0 siblings, 2 replies; 13+ messages in thread From: Bizhan Gholikhamseh (bgholikh) @ 2009-01-12 11:29 UTC (permalink / raw) To: kexec [-- Attachment #1.1: Type: text/plain, Size: 390 bytes --] HI all, I have been investigating how to boot Linux as bootstrap to boot another Linux. From my understanding, Linux has a kexec system call which provides overlay another Linux image on the current running Linux. Is my understanding correct? Is there any other available tool that I can use? Many thanks in advance, Biz [-- Attachment #1.2: Type: text/html, Size: 4013 bytes --] [-- Attachment #2: Type: text/plain, Size: 143 bytes --] _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: newbie question: kexec linux-based bootstrap 2009-01-12 11:29 newbie question: kexec linux-based bootstrap Bizhan Gholikhamseh (bgholikh) @ 2009-01-12 13:09 ` Sven Anders 2009-01-12 22:00 ` Bizhan Gholikhamseh (bgholikh) 2009-01-13 14:49 ` David N. Lombard 2009-01-13 18:41 ` Geoff Levand 1 sibling, 2 replies; 13+ messages in thread From: Sven Anders @ 2009-01-12 13:09 UTC (permalink / raw) To: Bizhan Gholikhamseh (bgholikh); +Cc: kexec [-- Attachment #1.1: Type: text/plain, Size: 1524 bytes --] Bizhan Gholikhamseh (bgholikh) schrieb: > > HI all, > > =20 > > I have been investigating how to boot Linux as bootstrap to boot > another Linux. > > =20 > > From my understanding, Linux has a kexec system call which provides > overlay another Linux image on the current running Linux. > > =20 > > Is my understanding correct? > Yes, it correct. We are using a similiar configuration without problems. Mit freundlichen Gr=FC=DFen Sven Anders --=20 Sven Anders <anders@anduras.de> () Ascii Ribbon Campaign= /\ Support plain text e-= mail ANDURAS service solutions AG Innstra=DFe 71 - 94036 Passau - Germany Web: www.anduras.de - Tel: +49 (0)851-4 90 50-0 - Fax: +49 (0)851-4 90 5= 0-55 Rechtsform: Aktiengesellschaft - Sitz: Passau - Amtsgericht Passau HRB 60= 32 Mitglieder des Vorstands: Sven Anders, Marcus Junker Vorsitzender des Aufsichtsrats: Mark Peters --------------020700000505060307000205 Content-Type: text/x-vcard; charset=utf-8; name="anders.vcf" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="anders.vcf" begin:vcard fn:Sven Anders n:Anders;Sven org:ANDURAS AG;Research and Development adr;quoted-printable:;;Innstra=3DC3=3D9Fe 71;Passau;Bavaria;94036;Germany= email;internet:anders@anduras.de title:Dipl. Inf. tel;work:++49 (0)851 / 490 50 -0 tel;fax:++49 (0)851 / 590 50 - 55 x-mozilla-html:FALSE url:http://www.anduras.de version:2.1 end:vcard --------------020700000505060307000205-- [-- Attachment #1.2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 260 bytes --] [-- Attachment #2: Type: text/plain, Size: 143 bytes --] _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: newbie question: kexec linux-based bootstrap 2009-01-12 13:09 ` Sven Anders @ 2009-01-12 22:00 ` Bizhan Gholikhamseh (bgholikh) 2009-01-12 22:04 ` Randy Dunlap 2009-01-13 14:49 ` David N. Lombard 1 sibling, 1 reply; 13+ messages in thread From: Bizhan Gholikhamseh (bgholikh) @ 2009-01-12 22:00 UTC (permalink / raw) To: Sven Anders; +Cc: kexec > > > > Yes, it correct. We are using a similiar configuration without problems. > We are using Linux kernel 2.6.23, where could I download the kexec-tools, to compile? Thanks, Bizhan _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: newbie question: kexec linux-based bootstrap 2009-01-12 22:00 ` Bizhan Gholikhamseh (bgholikh) @ 2009-01-12 22:04 ` Randy Dunlap 2009-01-12 22:44 ` Bizhan Gholikhamseh (bgholikh) 0 siblings, 1 reply; 13+ messages in thread From: Randy Dunlap @ 2009-01-12 22:04 UTC (permalink / raw) To: Bizhan Gholikhamseh (bgholikh); +Cc: Sven Anders, kexec Bizhan Gholikhamseh (bgholikh) wrote: > >> Yes, it correct. We are using a similiar configuration without > problems. > We are using Linux kernel 2.6.23, where could I download the > kexec-tools, to compile? www.google.com/linux, search for kexec-tools, first hit is it. I use kexec daily for boot-testing new kernels. -- ~Randy _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: newbie question: kexec linux-based bootstrap 2009-01-12 22:04 ` Randy Dunlap @ 2009-01-12 22:44 ` Bizhan Gholikhamseh (bgholikh) 2009-01-12 22:54 ` Randy Dunlap 0 siblings, 1 reply; 13+ messages in thread From: Bizhan Gholikhamseh (bgholikh) @ 2009-01-12 22:44 UTC (permalink / raw) To: Randy Dunlap; +Cc: Sven Anders, kexec > I use kexec daily for boot-testing new kernels. I have enabled the kexec in the kernel configuration, when I ran the kexec I get the following error: # ./kexec -l ./bzImage kexec_load failed: Function not implemented entry = 0x977b8 flags = 0 nr_segments = 3 segment[0].buf = 0x8071600 segment[0].bufsz = 2a00 segment[0].mem = 0x3000 segment[0].memsz = 3000 segment[1].buf = 0x806a550 segment[1].bufsz = 7060 segment[1].mem = 0x97000 segment[1].memsz = 9000 segment[2].buf = 0xb7c3aa08 segment[2].bufsz = 1d7eb8 segment[2].mem = 0x100000 segment[2].memsz = 1d8000 ??? _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: newbie question: kexec linux-based bootstrap 2009-01-12 22:44 ` Bizhan Gholikhamseh (bgholikh) @ 2009-01-12 22:54 ` Randy Dunlap 2009-01-12 23:07 ` Bizhan Gholikhamseh (bgholikh) 0 siblings, 1 reply; 13+ messages in thread From: Randy Dunlap @ 2009-01-12 22:54 UTC (permalink / raw) To: Bizhan Gholikhamseh (bgholikh); +Cc: Sven Anders, kexec Bizhan Gholikhamseh (bgholikh) wrote: > >> I use kexec daily for boot-testing new kernels. > I have enabled the kexec in the kernel configuration, when I ran the > kexec I get the following error: You enabled kexec in the new kernel that you are trying to load or in the first/running kernel? It appears that kexec is not loaded in the first/running kernel, but it must be enabled for kexec-tools to work correctly. > # ./kexec -l ./bzImage > kexec_load failed: Function not implemented > entry = 0x977b8 flags = 0 > nr_segments = 3 > segment[0].buf = 0x8071600 > segment[0].bufsz = 2a00 > segment[0].mem = 0x3000 > segment[0].memsz = 3000 > segment[1].buf = 0x806a550 > segment[1].bufsz = 7060 > segment[1].mem = 0x97000 > segment[1].memsz = 9000 > segment[2].buf = 0xb7c3aa08 > segment[2].bufsz = 1d7eb8 > segment[2].mem = 0x100000 > segment[2].memsz = 1d8000 > > ??? > -- ~Randy _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: newbie question: kexec linux-based bootstrap 2009-01-12 22:54 ` Randy Dunlap @ 2009-01-12 23:07 ` Bizhan Gholikhamseh (bgholikh) 2009-01-12 23:15 ` Randy Dunlap 2009-01-13 4:32 ` M. Mohan Kumar 0 siblings, 2 replies; 13+ messages in thread From: Bizhan Gholikhamseh (bgholikh) @ 2009-01-12 23:07 UTC (permalink / raw) To: Randy Dunlap; +Cc: Sven Anders, kexec > > You enabled kexec in the new kernel that you are trying to load or in > the first/running kernel? It appears that kexec is not loaded in the > first/running kernel, but it must be enabled for kexec-tools to work > correctly. Yes, that was the problem, now I am getting a new error, I do not care for crash dump, but when I execute kexec -e it ask me to reserve some space for it and use kdump kernel, which is not the case I am interested: # ./kexec -e -append="root/dev/sdb2" Memory for crashkernel is not reserved Please reserve memory by passing "crashkernel=X@Y" parameter to the kernel Then try loading kdump kernel ??? _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: newbie question: kexec linux-based bootstrap 2009-01-12 23:07 ` Bizhan Gholikhamseh (bgholikh) @ 2009-01-12 23:15 ` Randy Dunlap 2009-01-13 4:32 ` M. Mohan Kumar 1 sibling, 0 replies; 13+ messages in thread From: Randy Dunlap @ 2009-01-12 23:15 UTC (permalink / raw) To: Bizhan Gholikhamseh (bgholikh); +Cc: Sven Anders, kexec Bizhan Gholikhamseh (bgholikh) wrote: >> You enabled kexec in the new kernel that you are trying to load or in >> the first/running kernel? It appears that kexec is not loaded in the >> first/running kernel, but it must be enabled for kexec-tools to work >> correctly. > > Yes, that was the problem, now I am getting a new error, I do not care > for crash dump, but when I execute kexec -e it ask me to reserve some > space for it and use kdump kernel, which is not the case I am > interested: > > # ./kexec -e -append="root/dev/sdb2" > Memory for crashkernel is not reserved > Please reserve memory by passing "crashkernel=X@Y" parameter to the > kernel > Then try loading kdump kernel > > > ??? You still need to reserve space for the new kernel to be loaded into. It has to be loaded into memory before it is needed. Those messages that say "crashkernel" can be misleading, but that's what the kernel parameter is named. -- ~Randy _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: newbie question: kexec linux-based bootstrap 2009-01-12 23:07 ` Bizhan Gholikhamseh (bgholikh) 2009-01-12 23:15 ` Randy Dunlap @ 2009-01-13 4:32 ` M. Mohan Kumar 1 sibling, 0 replies; 13+ messages in thread From: M. Mohan Kumar @ 2009-01-13 4:32 UTC (permalink / raw) To: kexec; +Cc: Randy Dunlap, Sven Anders, Bizhan Gholikhamseh (bgholikh) > # ./kexec -e -append="root/dev/sdb2" > Memory for crashkernel is not reserved > Please reserve memory by passing "crashkernel=X@Y" parameter to the > kernel > Then try loading kdump kernel kexec -e does not take any parameter. Just run "kexec -e" which should start booting the new kernel. Regards, Mohan. _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: newbie question: kexec linux-based bootstrap 2009-01-12 13:09 ` Sven Anders 2009-01-12 22:00 ` Bizhan Gholikhamseh (bgholikh) @ 2009-01-13 14:49 ` David N. Lombard 2009-01-13 15:42 ` Bizhan Gholikhamseh (bgholikh) 1 sibling, 1 reply; 13+ messages in thread From: David N. Lombard @ 2009-01-13 14:49 UTC (permalink / raw) To: Sven Anders; +Cc: kexec@lists.infradead.org, Bizhan Gholikhamseh (bgholikh) On Mon, Jan 12, 2009 at 05:09:59AM -0800, Sven Anders wrote: > Bizhan Gholikhamseh (bgholikh) schrieb: > > > > HI all, > > > > =20 > > > > I have been investigating how to boot Linux as bootstrap to boot > > another Linux. > > > > =20 > > > > From my understanding, Linux has a kexec system call which provides > > overlay another Linux image on the current running Linux. > > > > =20 > > > > Is my understanding correct? > > > Yes, it correct. We are using a similiar configuration without problems. I too use kexec & kexec-tools, for a couple of years now. On IA using kexec-tools 2.0.0, use a command like this to load the kernel: kexec -l bzImage --initrd=initrd.img --command-line="kernel-cmd-args" where bzImage is the kernel's bzImage file initrd.img is the initrd image file kernel-cmd-args are the kernel's command line args Then, boot the kernel with: kexec -e -- David N. Lombard, Intel, Irvine, CA I do not speak for Intel Corporation; all comments are strictly my own. _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: newbie question: kexec linux-based bootstrap 2009-01-13 14:49 ` David N. Lombard @ 2009-01-13 15:42 ` Bizhan Gholikhamseh (bgholikh) 2009-01-13 16:43 ` David N. Lombard 0 siblings, 1 reply; 13+ messages in thread From: Bizhan Gholikhamseh (bgholikh) @ 2009-01-13 15:42 UTC (permalink / raw) To: David N. Lombard, Sven Anders; +Cc: kexec > On IA using kexec-tools 2.0.0, use a command like this to load the kernel: > > kexec -l bzImage --initrd=initrd.img --command-line="kernel-cmd-args" > > where > bzImage is the kernel's bzImage file > initrd.img is the initrd image file > kernel-cmd-args are the kernel's command line args > > Then, boot the kernel with: > > kexec -e We are using ramdisk instead of initrd, do you know what arguments I need to pass to point to the ramdisk install on a partition on SATA disk: e.g /dev/sda2? Bizhan _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: newbie question: kexec linux-based bootstrap 2009-01-13 15:42 ` Bizhan Gholikhamseh (bgholikh) @ 2009-01-13 16:43 ` David N. Lombard 0 siblings, 0 replies; 13+ messages in thread From: David N. Lombard @ 2009-01-13 16:43 UTC (permalink / raw) To: Bizhan Gholikhamseh (bgholikh) Cc: David N. Lombard, Sven Anders, kexec@lists.infradead.org On Tue, Jan 13, 2009 at 07:42:57AM -0800, Bizhan Gholikhamseh (bgholikh) wrote: > > On IA using kexec-tools 2.0.0, use a command like this to load the > kernel: > > > > kexec -l bzImage --initrd=initrd.img > --command-line="kernel-cmd-args" > > > > where > > bzImage is the kernel's bzImage file > > initrd.img is the initrd image file > > kernel-cmd-args are the kernel's command line args > > > > Then, boot the kernel with: > > > > kexec -e > > We are using ramdisk instead of initrd, do you know what arguments I > need to pass to point to the ramdisk install on a partition on SATA > disk: e.g /dev/sda2? I'm not sure what you mean by "ramdisk install on ... SATA disk". If you want to just try kexec, take look at your current boot configuration file, e.g., /boot/grub/grub.conf. For example, on my F7 system, I have the following stanza: title Fedora (2.6.23.15-80.fc7) root (hd0,0) kernel /vmlinuz-2.6.23.15-80.fc7 ro root=/dev/VolGroup00/LogVol00 rhgb quiet initrd /initrd-2.6.23.15-80.fc7.img I could boot that as follows: kexec -l /boot/vmlinuz-2.6.23.15-80.fc7 \ --initrd=/boot/initrd-2.6.23.15-80.fc7.img \ --command-line="ro root=/dev/VolGroup00/LogVol00 rhgb quiet" kexec -e Alternatively, to boot a diskless kernel/initrd, I might use kexec -l vmlinuz --initrd=initrd.img --command-line="root=/dev/ram rw" kexec -e -- David N. Lombard, Intel, Irvine, CA I do not speak for Intel Corporation; all comments are strictly my own. _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: newbie question: kexec linux-based bootstrap 2009-01-12 11:29 newbie question: kexec linux-based bootstrap Bizhan Gholikhamseh (bgholikh) 2009-01-12 13:09 ` Sven Anders @ 2009-01-13 18:41 ` Geoff Levand 1 sibling, 0 replies; 13+ messages in thread From: Geoff Levand @ 2009-01-13 18:41 UTC (permalink / raw) To: Bizhan Gholikhamseh (bgholikh); +Cc: kexec Hi, Bizhan Gholikhamseh (bgholikh) wrote: > I have been investigating how to boot Linux as bootstrap to boot another > Linux. The ps3 uses this method for its bootloaders. The linux kernel and a small file system are put into the system's flash memory. You can find some (old) info about the petitboot bootloader here: http://ozlabs.org/~jk/projects/petitboot/ Another kexec based bootloader is kboot: http://kboot.sourceforge.net/ -Geoff _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2009-01-13 18:41 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-01-12 11:29 newbie question: kexec linux-based bootstrap Bizhan Gholikhamseh (bgholikh) 2009-01-12 13:09 ` Sven Anders 2009-01-12 22:00 ` Bizhan Gholikhamseh (bgholikh) 2009-01-12 22:04 ` Randy Dunlap 2009-01-12 22:44 ` Bizhan Gholikhamseh (bgholikh) 2009-01-12 22:54 ` Randy Dunlap 2009-01-12 23:07 ` Bizhan Gholikhamseh (bgholikh) 2009-01-12 23:15 ` Randy Dunlap 2009-01-13 4:32 ` M. Mohan Kumar 2009-01-13 14:49 ` David N. Lombard 2009-01-13 15:42 ` Bizhan Gholikhamseh (bgholikh) 2009-01-13 16:43 ` David N. Lombard 2009-01-13 18:41 ` Geoff Levand
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox