<Linux, Admin> Bootable USB
ブータブル Bootable USB
のメモ。
Ubuntu
を手動でインストールして、Bootable USB
を作る方法。
まずは、Ubuntu
のisoをダウンロード。
で、ダウンロードしたisoを選択して、右クリックから、マウントする。
マウント結果。
で、FAT32
にフォーマットされたUSBにisoの中身を全部コピー。
その後、管理者権限で、cmd.exe
を立ち上げて、bootsect /nt60 <drive名>:
と打つとかあるが、、
UEFI
だといらん。。。
うちのThinkPad
くんたちは、UEFI
だった。
MRB形式とは、GPT形式とか難しいことがあるが、、
USB上に、EFI/BOOT/BOOTx64.EFI
があると、これをブートローダって認識するらしい。
で、同じディレクトリにあるgrubx64.eft
を呼び出して、
で、boot/grub/grub.cfg
を呼び出して、
ブートしていくらしい。
boot/grub/grub.cfg
の中身。
if loadfont /boot/grub/font.pf2 ; then set gfxmode=auto insmod efi_gop insmod efi_uga insmod gfxterm terminal_output gfxterm fi set menu_color_normal=white/black set menu_color_highlight=black/light-gray set timeout=5 menuentry "Try Ubuntu without installing" { set gfxpayload=keep linux /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash --- initrd /casper/initrd } menuentry "Install Ubuntu" { set gfxpayload=keep linux /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity quiet splash --- initrd /casper/initrd } menuentry "OEM install (for manufacturers)" { set gfxpayload=keep linux /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity quiet splash oem-config/enable=true --- initrd /casper/initrd } menuentry "Check disc for defects" { set gfxpayload=keep linux /casper/vmlinuz boot=casper integrity-check quiet splash --- initrd /casper/initrd }
quiet
ちゅうのは、コンソール上に出るメッセージを抑えるっぽい。splash
ちゅうのは、絵がでるらしい。single
って書くと、GUI
でなくて、CUI
で立ち上がる。ランレベルを1
に設定するらしい。text
って書くと、(quite/splashを削る)CUI
で立ち上がる。
その他メモ。
ブートローダ起動時に設定されたカーネルオプションは/proc/cmdlineに記載。
syslinux
+ UEFI
でやろうと思ったが、なんとも動かなかった。。。 げぶあっぷ。
UEFI
でブートしているか?
Windowsの場合。
下記のように、BOOTSERVICE ACCESS
と出れば、それ。
PS C:> Get-SecureBootUEFI -Name SetupMode Name Bytes Attributes ---- ----- ---------- SetupMode {0} BOOTSERVICE ACCESS...
Linuxの場合は、/sys/firmware/efi
を見る。
> ls -al /sys/firmware/efi total 0 drwxr-xr-x 4 root root 0 Dec 2 23:54 . drwxr-xr-x 5 root root 0 Dec 2 23:54 .. drwxr-xr-x 2 root root 0 Dec 2 23:54 efivars -r-------- 1 root root 4096 Dec 2 23:54 systab drwxr-xr-x 27 root root 0 Dec 2 23:55 vars