From 6b24838001402052155efe438b5cacc28239b62e Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Tue, 8 May 2018 17:25:28 +0200 Subject: [PATCH] Add 2 WIP blog posts --- _posts/2017-05-03-liveusb.md | 100 +++++++++++++++++++++++++++++++++++ _posts/2017-05-08-backups.md | 61 +++++++++++++++++++++ 2 files changed, 161 insertions(+) create mode 100644 _posts/2017-05-03-liveusb.md create mode 100644 _posts/2017-05-08-backups.md diff --git a/_posts/2017-05-03-liveusb.md b/_posts/2017-05-03-liveusb.md new file mode 100644 index 0000000..ce93d5b --- /dev/null +++ b/_posts/2017-05-03-liveusb.md @@ -0,0 +1,100 @@ +--- +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 + diff --git a/_posts/2017-05-08-backups.md b/_posts/2017-05-08-backups.md new file mode 100644 index 0000000..d42af67 --- /dev/null +++ b/_posts/2017-05-08-backups.md @@ -0,0 +1,61 @@ +--- +layout: post +slug: todo +status: draft +sitemap: false +title: todo +description: todo +categories: +- linux +tags: +--- + + + +HP DDS 4 +Digital Data Storage + + +Monter le système fuse Seafile : + +```bash +./seaf-fuse.sh start /mnt/seafile +``` + +Sauvegarde : + +```bash +mt -f /dev/st0 rewind +tar -czf /dev/st0 /mnt/seafile/xxx@xxx.xx/ +``` + +Informations : + +```bash +mt -f /dev/st0 status +mt -f /dev/st0 tell +tar -tzf /dev/st0 +``` + +Liste des fichiers + +``` +tar -tzf /dev/st0 +``` + +Restauration + +```bash +mt -f /dev/st0 rewind +tar -xzf /dev/st0 /tmp/ +``` + +Efface : + +```bash +mt -f /dev/st0 erase +``` + + * https://manual.seafile.com/extension/fuse.html + * https://www.cyberciti.biz/faq/linux-tape-backup-with-mt-and-tar-command-howto/ + * https://www.cyberciti.biz/hardware/unix-linux-basic-tape-management-commands/