multiboot_usb_key
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
multiboot_usb_key [2011/11/01 15:29] – zDUtPzlQI 94.76.244.212 | multiboot_usb_key [2021/02/01 05:55] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | xGWJvB | + | ====== Multiboot usb key with 32 and 64bits debian installers and debian live ====== |
+ | |||
+ | ===== Preparing the usb key ===== | ||
+ | |||
+ | * Create | ||
+ | |||
+ | cfdisk /dev/sdb | ||
+ | mkfs.vfat /dev/sdb1 | ||
+ | |||
+ | * Install grub on the usb key | ||
+ | |||
+ | mount /dev/sdb1 / | ||
+ | grub-install --no-floppy --root-directory=/media/usb0 /dev/sdb | ||
+ | |||
+ | * Create a grub.cfg file in / | ||
+ | |||
+ | menuentry | ||
+ | linux / | ||
+ | initrd / | ||
+ | } | ||
+ | |||
+ | menuentry " | ||
+ | linux / | ||
+ | initrd / | ||
+ | } | ||
+ | |||
+ | menuentry " | ||
+ | linux / | ||
+ | initrd / | ||
+ | } | ||
+ | |||
+ | menuentry " | ||
+ | linux / | ||
+ | initrd / | ||
+ | } | ||
+ | |||
+ | menuentry "live amd64" { | ||
+ | linux / | ||
+ | initrd / | ||
+ | } | ||
+ | |||
+ | menuentry "live i386" { | ||
+ | linux / | ||
+ | initrd / | ||
+ | } | ||
+ | |||
+ | ===== Debian installer ===== | ||
+ | |||
+ | * Get the hd-usb debian installer vmlinuz and initrd.gz files from the web. Rename them to vmlinuz_$arch and initrd_$arch.gz, | ||
+ | * Get the corresponding netinstall iso files for the installed architectures and copy them to / | ||
+ | |||
+ | ===== Debian live ===== | ||
+ | |||
+ | * Create some necessary directories: | ||
+ | |||
+ | mkdir /media/usb0/ | ||
+ | mkdir / | ||
+ | mkdir / | ||
+ | mkdir / | ||
+ | mkdir / | ||
+ | |||
+ | ==== Generate the debian live image ==== | ||
+ | |||
+ | * Install live-helper package | ||
+ | * Create live image (do this from a 64bit machine): | ||
+ | |||
+ | mkdir /tmp/d-l | ||
+ | mkdir / | ||
+ | cd / | ||
+ | sudo lh clean --binary | ||
+ | sudo lh config -b usb-hdd -a amd64 -d sid | ||
+ | sudo lh build | ||
+ | |||
+ | * When the build is finished edit the file chroot/ | ||
+ | * Replace the line: | ||
+ | |||
+ | SNAP_COW=$(echo " | ||
+ | |||
+ | * With: | ||
+ | |||
+ | SNAP_COW=$(echo " | ||
+ | |||
+ | * Regenerate the live image: | ||
+ | |||
+ | sudo lh clean --binary | ||
+ | sudo lh binary | ||
+ | |||
+ | * Loop mount the generated live image, copy the important parts to the usb key, and extract the initrd contents: | ||
+ | |||
+ | mount -o loop, | ||
+ | cd /mnt/live | ||
+ | cp * / | ||
+ | mkdir / | ||
+ | cp / | ||
+ | cd / | ||
+ | gunzip initrd.img.gz | ||
+ | cpio -ivmd -F initrd.img | ||
+ | rm initrd.img | ||
+ | |||
+ | * Edit the file scripts/ | ||
+ | * Replace line: | ||
+ | |||
+ | ${snap_type}SNAP="/ | ||
+ | |||
+ | * With: | ||
+ | |||
+ | ${snap_type}SNAP="/ | ||
+ | |||
+ | * And replace line: | ||
+ | |||
+ | snapdata=$(find_files " | ||
+ | |||
+ | * With: | ||
+ | |||
+ | snapdata=$(find_files " | ||
+ | |||
+ | * Recreate initrd.img file, and copy it to the usb key: | ||
+ | |||
+ | find .| cpio -o -H newc | gzip -9 > ../ | ||
+ | cp ../ | ||
+ | |||
+ | * Repeat the whole procedure for the 32bits case, just use i386 where amd64 is. | ||
+ | |||
+ | ===== Debian Live (February 2013) ===== | ||
+ | |||
+ | mkdir / | ||
+ | cd / | ||
+ | lb config -a amd64 -d sid --mirror-bootstrap http:// | ||
+ | |||
+ | In directory config/ | ||
+ | |||
+ | lvm2 | ||
+ | testdisk | ||
+ | dmsetup | ||
+ | cryptsetup | ||
+ | cryptmount | ||
+ | gdisk | ||
+ | emacs | ||
+ | mc | ||
+ | joe | ||
+ | gddrescue | ||
+ | magicrescue | ||
+ | wipe | ||
+ | ntfs-3g | ||
+ | partimage | ||
+ | sshfs | ||
+ | firmware-linux-nonfree | ||
+ | firmware-linux | ||
+ |
multiboot_usb_key.1320161390.txt.gz · Last modified: 2021/02/01 05:55 (external edit)