IMG로 부팅하기 위해 USB에 GRUB를 어떻게 설정합니까?

IMG로 부팅하기 위해 USB에 GRUB를 어떻게 설정합니까?

빈 USB에 복사하고 부팅하고 싶은 IMG 파일이 있습니다. 어떻게 해야 합니까?

답변1

USB를 vfat로 포맷하거나 영구 파티션을 원할 경우 알려주시면 나중에 해당 지침을 추가하겠습니다.

fdisk /dev/sdb #if the usb is listed as sdb
    d
    n
    p
    1
    <enter>
    <enter>
    t
    c
    w
mkfs.vfat /dev/sdb1
mkdir /mnt/temp; mount /dev/sdb1 /mnt/temp
mkdir /mnt/temp2; mount -o loop /path/to/the/ISO.iso

모든 내용을 복사하세요.

rsync -avhP /mnt/temp2/* /mnt/temp

그럽을 설치하십시오:

grub-install --no-floppy --root-directory=/mnt/temp /dev/sdb

그런 다음 grub.cfg를 만드십시오. 너무 어렵지 않아야합니다. 아니면 그냥 비워두고 원하는 경우 grub 명령으로 부팅할 수도 있습니다. 부팅하려고 할 때마다 다음과 같은 내용이 필요합니다.

linux /boot/vmlinuz
initrd /boot/initrd.img boot=casper cdrom-detect/try-usb=true

관련 정보