Article Title: Learn How to Create LFSLiveUSB. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Can I start LFS LiveCD with a CD?
Can an LFS LiveCD image be started from a hard disk?
Isn't it possible to compile and learn LFS directly in another release without using LFS LiveCD?
This ...... That's right. The LFS LiveUSB is created because someone is idle.
Insert a USB flash drive to view the device name of the USB flash drive.
$ Sudo/sbin/fdisk-l
...
Device Boot Start End Blocks Id System
/Dev/sdb1 1 250 2008093 + 83 Linux
Unmount the USB flash drive, partition and format it
$ Sudo umount/dev/sdb1
$ Sudo/sbin/fdisk/dev/sdb
...
// The fdisk operation is omitted.
// For detailed tutorial, please read Gentoo document http://www.gentoo.org/doc/zh_cn/handbook/handbook-x86.xml? In part = 1 & chap = 4, "4. c. Use fdisk to partition your disk"
// The key point is to add the boot flag for the first partition.
// E.g. Command (m for help):
$ Sudo mkfs. ext3/dev/sdb1
Install grub to a USB flash drive
$ Sudo mount/dev/sdb1/media/usb
// Install gurb to/media/usb
$ Sudo grub-install -- root-directory =/media/usb/dev/sdb1
$ Sudo umount/dev/sdb1
$ Sudo grub
> Root (hd1, 0) // 2nd partitions of the first 1st Devices
> Setup (hd1) // Mount grub into hd1 mbr
> Quit
Copy a file
$ Sudo mount/dev/sdb1/media/usb
// After downloading the LFS LiveCD image, name it lfs. iso (to debug the grub command line after the system is restarted conveniently)
// Initramfs_data.cpio.gz, linux, and other files are obtained from/boot/syslinux in lfs. iso.
// The Copy command is omitted. The copied file list is as follows:
$ Find/media/usb
/Media/usb/lfs. iso
/Media/usb/boot/initramfs_data.cpio.gz
/Media/usb/boot/linux
Edit menu. lst
$ Cat/media/usb/boot/grub/menu. lst
Default 0
Timeout 1
Color cyan/blue white/blue
Title LFS Live
Root (hd0, 0)
Kernel/boot/linux root = iso:/dev/sdb1:/lfs. iso rw rootdelay = 20
Initrd/boot/initramfs_data.cpio.gz
/// Dev/sdb1 from the process of startup failure, manually press root, kernel, and 'mount command + tab 'of the shell entered by initrd In the grub command line to obtain
// Rootdelay = 20 during startup failure, the error message on the screen is displayed, because it is a usb device, so time detection is required for the device.
Restart the system, insert the created LFS LiveUSB, set the BIOS, and everything is OK.