Trace: lvmlinux multistrap

Multistrap

sudo su -
mkdir /home/emonge/debian11
mount -t 9p -o trans=virtio fs0 /home/emonge/debian11 -oversion=9p2000.L,posixacl,msize=5000000,cache=mmap
cat > /home/emonge/multistrap.conf <<EOF
[General]
unpack=true
debootstrap=Debian
aptsources=Debian

[Debian]
source=http://ftp.us.debian.org/debian
suite=bullseye
keyring=debian-archive-keyring
EOF
/usr/sbin/multistrap -a amd64 -d /home/emonge/debian11/ -f /home/emonge/multistrap.conf
mount -o bind /proc /home/emonge/debian11/proc
mount -o bind /dev /home/emonge/debian11/dev
mount -o bind /dev/pts /home/emonge/debian11/dev/pts
mount -o bind /sys /home/emonge/debian11/sys
chroot /home/emonge/debian11 /bin/bash
mount -t tmpfs -o noatime,size=500M tmpfs /tmp
dpkg-reconfigure tzdata
dpkg-reconfigure locales
cd /etc/initramfs-tools
echo 9p >> modules
echo 9pnet >> modules
echo 9pnet_virtio >> modules
update-initramfs -u
passwd
echo 'tmpfs /tmp tmpfs rw,nosuid,nodev,size=524288k,nr_inodes=204800 0 0' >> /etc/fstab
umount /tmp
exit
umount /home/emonge/debian11/proc
umount /home/emonge/debian11/dev/pts
umount /home/emonge/debian11/dev
umount /home/emonge/debian11/sys
/usr/bin/qemu-system-x86_64 \
   -machine pc,accel=kvm,usb=off,dump-guest-core=off -m 2048 \
   -smp 4,sockets=4,cores=1,threads=1 -rtc base=utc \
   -boot strict=on -kernel /home/emonge/debian11/boot/vmlinuz-5.10.0-13-amd64 \
   -initrd /home/emonge/debian11/boot/initrd.img-5.10.0-13-amd64 \
   -append 'root=fsRoot rw rootfstype=9p rootflags=trans=virtio,version=9p2000.L,msize=5000000,cache=mmap,posixacl console=ttyS0 init=/bin/systemd' \
   -fsdev local,security_model=mapped,multidevs=remap,id=fsRoot,path=/home/emonge/debian11/ \
   -device virtio-9p-pci,id=fsRoot,fsdev=fsRoot,mount_tag=fsRoot \
   -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
   -nographic

References

multistrap.txt · Last modified: 2022/05/03 23:16
Public Domain Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain