Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

hd-media/boot.img.gz resize

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
blockbuster5
Posts: 3
Joined: 2019-08-19 23:48

hd-media/boot.img.gz resize

#1 Post by blockbuster5 »

Hi,

Is there a way I can resize or get a bigger boot.img.gz of debian? I would like to put in a bigger image than the current 1G limitation.

Thanks!

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: hd-media/boot.img.gz resize

#2 Post by p.H »

I guess you can uncompress the image, extend it, extend the partition and filesystem inside, and compress the image again.
May I ask why you want to use this image ?

blockbuster5
Posts: 3
Joined: 2019-08-19 23:48

Re: hd-media/boot.img.gz resize

#3 Post by blockbuster5 »

Once the image is uncompressed, how can I extend it (extend the partition)? Any commands or tools?

I looked online and tried: sudo qemu-img resize boot.img 3G
But when I write it to a drive zcat boot.img.gz > /dev/sdb The filesystem is still 1G. How can I extend it?

I am going to add my own stuff to the image which will make it larger than 1G.

thanks!

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: hd-media/boot.img.gz resize

#4 Post by p.H »

You must resize the partition with any partition tool (fdisk, parted...) and the filesystem with that filesystem-specific resize tool (resize2fs for ext*, fatresize for FAT...). Thinking of it, I seem to remember observing that fatresize mangled the filesystem boot sector, so the image may not boot properly.

You know that the installation manual describes other methods to use a bigger image, don't you ?

blockbuster5
Posts: 3
Joined: 2019-08-19 23:48

Re: hd-media/boot.img.gz resize

#5 Post by blockbuster5 »

p.H wrote: You know that the installation manual describes other methods to use a bigger image, don't you ?
Can you point me to method to use bigger custom image?

thanks!

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: hd-media/boot.img.gz resize

#6 Post by p.H »

4.3.3. Manually copying files to the USB stick — the flexible way
https://www.debian.org/releases/stable/ ... y-flexible

Post Reply