Compare commits

..

No commits in common. "489e51a2ebc2785d4828deb5030b71214d09fbad" and "070a9cecb798791033441ebd92049d3f006302cf" have entirely different histories.

2 changed files with 9 additions and 16 deletions

View file

@ -154,4 +154,3 @@ Contributors
- Konstantin Demin - Konstantin Demin
- Trent W. Buck - Trent W. Buck
- Vagrant Cascadian - Vagrant Cascadian
- Gioele Barabucci

View file

@ -4094,10 +4094,7 @@ sub approx_disk_usage {
$installed_size += 1; $installed_size += 1;
} }
}; };
# We use no_chdir because otherwise the unshared user has to have read find($scan_installed_size, $directory);
# permissions for the current working directory when producing an ext2
# image. See https://bugs.debian.org/1005857
find({ wanted => $scan_installed_size, no_chdir => 1 }, $directory);
# because the above is only a heuristic we add 10% extra for good measure # because the above is only a heuristic we add 10% extra for good measure
return int($installed_size * 1.1); return int($installed_size * 1.1);
@ -6820,14 +6817,12 @@ Create a bootable USB Stick that boots into a full Debian desktop:
END END
# You can use $(sudo blockdev --getsize64 /dev/sdXXX) to get the right # You can use $(sudo blockdev --getsize64 /dev/sdXXX) to get the right
# image size for the target medium in bytes # image size for the target medium in bytes
$ guestfish -N debian-unstable.img=disk:8G -- \ $ guestfish -N debian-unstable.img=disk:8G -- part-disk /dev/sda mbr : \
part-disk /dev/sda mbr : \ part-set-bootable /dev/sda 1 true : mkfs ext2 /dev/sda1 : \
part-set-bootable /dev/sda 1 true : \ set-label /dev/sda1 rootfs : mount /dev/sda1 / : \
set-label /dev/sda1 rootfs : \
mkfs ext4 /dev/sda1 : mount /dev/sda1 / : \
tar-in debian-unstable.tar / xattrs:true : \ tar-in debian-unstable.tar / xattrs:true : \
upload /usr/lib/EXTLINUX/mbr.bin /boot/mbr.bin : \ upload /usr/lib/SYSLINUX/mbr.bin /mbr.bin : \
copy-file-to-device /boot/mbr.bin /dev/sda size:440 : \ copy-file-to-device /mbr.bin /dev/sda size:440 : rm /mbr.bin : \
extlinux / : copy-in extlinux.conf / : sync : umount / : shutdown extlinux / : copy-in extlinux.conf / : sync : umount / : shutdown
$ qemu-system-x86_64 -m 1G -enable-kvm debian-unstable.img $ qemu-system-x86_64 -m 1G -enable-kvm debian-unstable.img
$ sudo dd if=debian-unstable.img of=/dev/sdXXX status=progress $ sudo dd if=debian-unstable.img of=/dev/sdXXX status=progress
@ -6862,11 +6857,10 @@ Use as replacement for autopkgtest-build-qemu and vmdb2:
$ guestfish -N debian-unstable.img=disk:8G -- \ $ guestfish -N debian-unstable.img=disk:8G -- \
part-disk /dev/sda mbr : \ part-disk /dev/sda mbr : \
part-set-bootable /dev/sda 1 true : \ part-set-bootable /dev/sda 1 true : \
mkfs ext4 /dev/sda1 : mount /dev/sda1 / : \ mkfs ext2 /dev/sda1 : mount /dev/sda1 / : \
tar-in debian-unstable.tar / xattrs:true : \ tar-in debian-unstable.tar / xattrs:true : \
upload /usr/lib/EXTLINUX/mbr.bin /boot/mbr.bin : \ extlinux / : copy-in extlinux.conf / : \
copy-file-to-device /boot/mbr.bin /dev/sda size:440 : \ sync : umount / : shutdown
extlinux / : copy-in extlinux.conf / : sync : umount / : shutdown
$ qemu-img convert -O qcow2 debian-unstable.img debian-unstable.qcow2 $ qemu-img convert -O qcow2 debian-unstable.img debian-unstable.qcow2
As a debootstrap wrapper to run it without superuser privileges but using Linux As a debootstrap wrapper to run it without superuser privileges but using Linux