]> git.plutz.net Git - bootimage/commitdiff
scripts for volume setup
authorPaul Hänsch <paul@plutz.net>
Sun, 24 Jun 2018 19:41:02 +0000 (21:41 +0200)
committerPaul Hänsch <paul@plutz.net>
Sun, 24 Jun 2018 19:41:02 +0000 (21:41 +0200)
.gitignore
Makefile
config_base/etc/hostname
config_base/etc/hosts [new file with mode: 0644]
partitions [new file with mode: 0644]
syslinux.cfg

index 82234ff53c6a518c5e5d839d7a146c0edfd07498..51b48d0c2aff9aa6130124202e10c27be554f38a 100644 (file)
@@ -1,2 +1,3 @@
 stretch_*_config/
 stretch_*_root/
+stretch_*.squashfs
index 2c6c749ee6459a7ddaaff3ee891bb8cbf0f607d2..5ea6b7c89d90bd0d1daa07a965be32c22b423613 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -45,3 +45,19 @@ stretch_%_config/: stretch_%_root/ ${CONFIG} permissions .FORCE
 stretch_%.squashfs: stretch_%_config/
        rm "$@" || true
        mksquashfs "$<" "$@" -comp xz
+
+/dev/sd%: partitions vmlinuz initrd.img syslinux.cfg .FORCE
+       mkdir mount
+       sfdisk ${@} <partitions
+       mkfs.ext3 -L SQUASHBOOT ${@}1
+       mkfs.btrfs -L SQUASHCLIENT ${@}2
+       dd of=${@} if=/usr/lib/syslinux/mbr/mbr.bin
+       mount -t ext3 ${@}1 mount
+       cp -L vmlinuz initrd.img *.squashfs syslinux.cfg mount/
+       cp $(addprefix /usr/lib/syslinux/modules/bios/, menu.c32 libutil.c32) mount/
+       extlinux -i mount/
+       umount mount/
+       mount -t btrfs ${@}2 mount
+       btrfs subvolume create mount/home
+       chmod 0755 mount/home
+       umount mount/
index 104920e88729d22efe83f993e82200e6283c6f0b..9327fc4583b2781020369c5aeea0464e4803a95a 100644 (file)
@@ -1 +1 @@
-stretch-i386
+stretch-squash
diff --git a/config_base/etc/hosts b/config_base/etc/hosts
new file mode 100644 (file)
index 0000000..db93d46
--- /dev/null
@@ -0,0 +1,5 @@
+127.0.0.1      localhost stretch-squash
+::1            localhost ip6-localhost ip6-loopback
+ff02::1                ip6-allnodes
+ff02::2                ip6-allrouters
+
diff --git a/partitions b/partitions
new file mode 100644 (file)
index 0000000..ec71edc
--- /dev/null
@@ -0,0 +1,5 @@
+label: dos
+unit: sectors
+
+: start=2048, size=6291456, type=83, bootable
+: type=83
index 0897228bdd8f67710daf35a2a92662031800538c..67486a4a93f9eaed588100985d9c762f81f53185 100644 (file)
@@ -1,10 +1,10 @@
 UI menu.c32
 
-DEFAULT stretch_i386
+DEFAULT stretch_squash
 TIMEOUT 30
 
-LABEL stretch_i386
-  MENU LABEL Debian Stretch 32bit
+LABEL stretch_squash
+  MENU LABEL Debian Stretch
   KERNEL vmlinuz
   INITRD initrd.img
   APPEND boot=live live-media-path=/ quiet