quentin.dufour.io/_posts/2017-05-03-liveusb.md
2018-05-08 17:25:28 +02:00

100 lines
2.2 KiB
Markdown

---
layout: post
slug: liveusb
status: draft
sitemap: false
title: todo
description: todo
categories:
- linux
tags:
---
```bash
sudo dnf install debootstrap
sudo debootstrap --arch=amd64 zesty live/
sudo mount --bind /dev live/dev
sudo vim live/etc/apt/sources.list # ajouter universe multiverse
# Chroot inside
sudo chroot live/
mount none -t proc /proc
mount none -t sysfs /sys
mount none -t devpts /dev/pts
# Install
sudo apt install \
xubuntu-desktop \
ubuntu-minimal \
linux-generic \
live-boot \
language-pack-fr \
arduino \
inkscape \
blender \
freecad \
openscad \
git \
kicad \
gimp \
git
passwd
adduser fabriqueurs
usermod -a -G dialout fabriqueurs
vim /etc/lightdm/lightdm.conf.d/01_autologin.conf
vim /etc/default/keyboard
dpkg-reconfigure locales
dpkg-reconfigure keyboard-configuration
su fabriqueurs
git clone https://github.com/jmoenig/Snap--Build-Your-Own-Blocks
# Télécharger repetier
# Extraire dans /home/fabriqueurs
# Executer ./installDependenciesDebian
# Cleaning
rm /var/lib/dbus/machine-id
apt clean
umount /proc /sys /dev/pts
# Create USB
mkdir -p binary/live binary/isolinux
cp live/boot/vmlinuz* binary/live/vmlinuz
cp live/boot/initrd* binary/live/initrd
mksquashfs ./live ./binary/live/filesystem.squashfs -comp xz -e boot
cp /usr/share/syslinux/isolinux.bin ./binary/isolinux/
cp /usr/share/syslinux/menu.c32 ./binary/isolinux/
cp /usr/share/syslinux/ldlinux.c32 ./binary/isolinux/
cp /usr/share/syslinux/libutil.c32 ./binary/isolinux/
vim ./binary/isolinux/isolinux.cfg
xorriso -as mkisofs \
-o output.iso \
-isohybrid-mbr /usr/share/syslinux/isohdpfx.bin \
-c isolinux/boot.cat \
-b isolinux/isolinux.bin \
-no-emul-boot -boot-load-size 4 -boot-info-table \
-eltorito-alt-boot \
-e boot/grub/efi.img \
-no-emul-boot \
-isohybrid-gpt-basdat \
./binary
```
On peut créer l'ISO à l'aide de xorriso ou genisoimage ou mkisofs
Utiliser virtualbox et pas qemu pour tester l'ISO
On a copié .disk, boot et EFI depuis l'ISO d'ubuntu sans comprendre.
https://help.ubuntu.com/community/LiveCDCustomizationFromScratch
https://l3net.wordpress.com/2013/09/21/how-to-build-a-debian-livecd/
http://www.syslinux.org/wiki/index.php?title=Isohybrid