Sponsored Content
Full Discussion: Kexec with Live USB/CD
Operating Systems Linux Kexec with Live USB/CD Post 302473237 by al0x on Friday 19th of November 2010 08:43:44 AM
Old 11-19-2010
Kexec with Live USB/CD

Hello

Recently I found this (for me) really usefull tool kexec which can load a new Kernel while running one.
I tested it some times with the same kernel I was running, "rebooting" the system without powering it off at any time Smilie
But I need kexec basically just for live usbs. I want to start a live USB within my running Linux, what works, but at one point it "exits" the loading process and give me a BusyBox...
It's something like
Code:
[xxxx] loading blablabla USB-Keyboard blablabla.
ALERT! does not exist. Returning to a shell.
BusyBox vX.xx
(initramfs)

I used this to load the kernel into kexec:
Code:
kexec -l /media/usb/casper/vmlinuz --append="ro root=/dev/sdb1" --initrd="/media/usb/casper/initrd" --ramdisk="/media/usb/casper/initrd --real-mode -d
kexec -d -e

This was working with the kernel on the main HDD that I was running, but won't work with my live-usb...

The idea behind that is that I want to check if the right USB-Stick is plugged in (checking UUID), then boot it and install the new system. Didn't get it to work over grub 2 and booting it with the BIOS isn't what I want (I want to boot one specific stick and not a hundreds others).

Anyone knows why it gives the the ALERT! ?
Thanks in advance! Smilie
greetz, alex
 

9 More Discussions You Might Find Interesting

1. Linux

Live Knoppix on usb sdb2 kernel not found

Hi all I have a usb external drive with two partitions sdb1 ntfs and sdb2 ext3 with label Linux I copied a knoppix live distro in the second partition, then I installed grub on the drive. Now in the directory /media/sdb2/boot/grub i have the file device.map with the following content: (hd0) ... (4 Replies)
Discussion started by: guast
4 Replies

2. UNIX for Dummies Questions & Answers

From Knoppix Live-USB to Old-school CLI Debian Linux.

Alright. Here we go... The other day, I was referred to this neat little command-line Unix simulator called Cygwin. To put it lightly, I fell in love. I found Knoppix, and from what I can tell, it's a viable OS once I strip off the KDE desktop environment to make it 'old-school'. I'm... (2 Replies)
Discussion started by: dev_squid
2 Replies

3. UNIX for Dummies Questions & Answers

USB-USB cable between linux and windows computers

Is there an easy way to setup a cross-over cable (USB-USB) between a linux box and a windows PC? My 2 machines are next to each other but I really do not want to keep transfering my files using my USB drive. Thanks! (4 Replies)
Discussion started by: Xterra
4 Replies

4. Red Hat

How to install fedora 13 from a usb media....it should not like 'live'?

im using Dell Inspiron with windows 7 as operating system.....in my hard drive there is some 34 gb unpartitioned space and now i want to install fedora 13 into it, after installation it should be dual boot. problem here is... i have the fedora 13 image file ie fedora13-i386-DVD.iso file. ... (13 Replies)
Discussion started by: karthik437
13 Replies

5. UNIX for Dummies Questions & Answers

kcore and a live persistent linux usb distro

I have 2 computers, from now on i shall call these computers A and B. Made a live linux distro (bodhi) on A which has 1GB internal memory , because windows is unstable on B, which has 512MB internal memory. I mean with memory the internal memory of the computer, not the memory of the usb... (0 Replies)
Discussion started by: anno
0 Replies

6. BSD

Freebsd live usb

Hello. I'm going to make freebsd live usb based on FreeBSD-8.3-RELEASE-i386-livefs.iso. The iso is 257 Megabytes, but after i copy its content to usb drive its volume increases to 971 Megabytes. I tried different methods of copying (tar,cp,cpio) but with the same result. Could anyone help? (0 Replies)
Discussion started by: urello
0 Replies

7. Solaris

Usbcopy fails with the error message sol-11_1-live-x86.usb is not a multiple of 512

I am trying to create a live image of solaris 11.1. I have used #pkg image-update to upgrade from 11 to 11.1 already. (since only 11.1 can make images of 11.1 due to using new grub) then from within 11.1 I used pkg install install distribution-constructor to get latest usbcopy that should be... (1 Reply)
Discussion started by: taltamir
1 Replies

8. Solaris

Solaris 11 install via live usb

Hello All, I am attempting to boot and install Solaris 11 via live USB on a HP DL580 Gen9 Server. Unfortunately, when I do this it boots into System Maintenance Mode. The attachment (Pic1) shows what I am seeing via the console. The BIOS is in UEFI boot. Does not work on legacy mode as I... (15 Replies)
Discussion started by: Kerbi
15 Replies

9. What is on Your Mind?

Update: UserCP Screeching Frog 0.7641 - Changed Live Chat to Live Updates

Update: UserCP Screeching Frog 0.7641 - Changed Live Chat to Live Updates In this version of the UserCP, I have changed "Live Chat" to "Live Updates" by disabling the ability to post in the "live chat" area and changed the name to "Live Updates" The reason for this change is that experienced... (6 Replies)
Discussion started by: Neo
6 Replies
kexec(8)							   User Manuals 							  kexec(8)

NAME
kexec - directly boot into a new kernel SYNOPSIS
/sbin/kexec [-v (--version)] [-f (--force)] [-x (--no-ifdown)] [-l (--load)] [-p (--load-panic)] [-u (--unload)] [-e (--exec)] [-t (--type)] [--mem-min=addr] [--mem-max=addr] DESCRIPTION
kexec is a system call that enables you to load and boot into another kernel from the currently running kernel. kexec performs the func- tion of the boot loader from within the kernel. The primary difference between a standard system boot and a kexec boot is that the hardware initialization normally performed by the BIOS or firmware (depending on architecture) is not performed during a kexec boot. This has the effect of reducing the time required for a reboot. Make sure you have selected CONFIG_KEXEC=y when configuring the kernel. The CONFIG_KEXEC option enables the kexec system call. USAGE
Using kexec consists of (1) loading the kernel to be rebooted to into memory, and (2) actually rebooting to the pre-loaded kernel. To load a kernel, the syntax is as follows: kexec -l kernel-image --append=command-line-options --initrd=initrd-image where kernel-image is the kernel file that you intend to reboot to. Insert the command-line parameters that must be passed to the new kernel into command-line-options. Passing the exact contents of /proc/cmdline into command-line-options is the safest way to ensure that correct values are passed to the rebooting kernel. The optional initrd-image is the initrd image to be used during boot. It's also possible to invoke kexec without an option parameter. In that case, kexec loads the specified kernel and then invokes shut- down(8). If the shutdown scripts of your Linux distribution support kexec-based rebooting, they then call kexec -e just before actually rebooting the machine. That way, the machine does a clean shutdown including all shutdown scripts. EXAMPLE
For example, if the kernel image you want to reboot to is /boot/vmlinux, the contents of /proc/cmdline is root=/dev/hda1, and the path to the initrd is /boot/initrd, then you would use the following command to load the kernel: kexec -l /boot/vmlinux --append=root=/dev/hda1 --initrd=/boot/initrd After this kernel is loaded, it can be booted to at any time using the command: kexec -e OPTIONS
-e (--exec) Run the currently loaded kernel. Note that it will reboot into the loaded kernel without calling shutdown(8). -f (--force) Force an immediate kexec call, do not call shutdown(8) (contrary to the default action without any option parameter). This option performs the same actions like executing -l and -e in one call. -h (--help) Open a help file for kexec. -l (--load) kernel Load the specified kernel into the current kernel. -p (--load-panic) Load the new kernel for use on panic. -t (--type=type) Specify that the new kernel is of this type. -u (--unload) Unload the current kexec target kernel. If a capture kernel is being unloaded then specify -p with -u. -v (--version) Return the version number of the installed utility. -x (--no-ifdown) Shut down the running kernel, but restore the interface on reload. (If this option is used, it must be specified last.) --mem-min=addr Specify the lowest memory address addr to load code into. --mem-max=addr Specify the highest memory address addr to load code into. SUPPORTED KERNEL FILE TYPES AND OPTIONS
Beoboot-x86 --args-elf Pass ELF boot notes. --args-linux Pass Linux kernel style options. -d (--debug) Enable debugging messages. --real-mode Use the kernel's real mode entry point. elf-x86 --append=string Append string to the kernel command line. --command-line=string Set the kernel command line to string. --reuse-cmdline Use the command line from the running system. When a panic kernel is loaded, it strips the crashkernel parameter automati- cally. The BOOT_IMAGE parameter is also stripped. --initrd=file Use file as the kernel's initial ramdisk. --ramdisk=file Use file as the kernel's initial ramdisk. bzImage-x86 --append=string Append string to the kernel command line. --command-line=string Set the kernel command line to string. --reuse-cmdline Use the command line from the running system. When a panic kernel is loaded, it strips the crashkernel parameter automati- cally. The BOOT_IMAGE parameter is also stripped. --initrd=file Use file as the kernel's initial ramdisk. --ramdisk=file Use file as the kernel's initial ramdisk. --real-mode Use real-mode entry point. multiboot-x86 --command-line=string Set the kernel command line to string. --reuse-cmdline Use the command line from the running system. When a panic kernel is loaded, it strips the crashkernel parameter automati- cally. The BOOT_IMAGE parameter is also stripped. --module=mod arg1 arg2 ... Load module mod with command-line arguments arg1 arg2 ... This parameter can be specified multiple times. ARCHITECTURE OPTIONS
--console-serial Enable the serial console. --console-vga Enable the VGA console. --elf32-core-headers Prepare core headers in ELF32 format. --elf64-core-headers Prepare core headers in ELF64 format. --reset-vga Attempt to reset a standard VGA device. --serial=port Specify the serial port for debug output. --serial-baud=baud_rate Specify the baud rate of the serial port. Linux April 2006 kexec(8)
All times are GMT -4. The time now is 02:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy