Closed fmieres closed 4 years ago
ive solved my own problem, gonna write it here for anyone that havent worked much with sfdisk and have the same problem.
sudo dd if=/dev/zero of=linux.img bs=${IMG_SIZE} count=XX
where XX is the amount of GB the disk (or image file) has.
the second one is inside the commands given to sfdisk , size parameter.
linux.img1 : start=2048, size=size, type=83, bootable
where size is as follows :
Since i dont know how partitions works at all, ive multiplied final size by amount of gb so ive got something like : ( XX * 2 * 1024 * 1024 ) - 2048
so for 4 gb image image file partition, it should be linux.img1 : start=2048, size=8386560, type=83, bootable
Im sure this may not be the appropiate solution, but it works!
Hi!,
I've been having trouble with these steps using a bigger disk size. Just changing
count
to 2 insudo dd if=/dev/zero of=linux.img bs=${IMG_SIZE} count=2
break the image at boot time.My custom debian image is a little bigger, like 2.5gb , but i've checked using the same debian:stretch used in this examples and when i try to create a bigger disk size, it breaks. (it works flawlessly with
sudo dd if=/dev/zero of=linux.img bs=${IMG_SIZE} count=1
I've would like to know more details about the sizes in the bootable part of the disk so i can change virtual disk size at will.