Re: [Hampshire] Partition resizing

Top Page

Reply to this message
Author: Jonathan Hudson
Date:  
To: hampshire
Subject: Re: [Hampshire] Partition resizing
On Sat, 21 Jul 2012 18:40:45 +0100, Leo wrote:

>I've downloaded ArchLinux for the Raspberry Pi, but it's a 2GB image.
>I've a 1GB SD, which the content should fit on, so I'm trying to resize it.
>
>I've now got to the point where I can create an image file with two
>partitions totalling 1GB that mount fine. But after I've dd-ed it to the
>SD card I can't mount either of the partitions on the SD card.
>
>Leo


In my experience, it's easier to mount the image and then recreate on
the media e.g: (and from second glass of wine memory, so check .... )

# qemu-nbd -c /dev/nbd0 $(pwd)/archlinuxarm-13-06-2012.img
# mount /dev/nbd0p2 /mnt/
# mount /dev/nbd0p1 /mnt/boot/
# #### format the SD card for /boot and /
# #### mount the SD card partitions
# rsync -ax --numeric-ids /mnt/boot/ /sdp1-mount/
# rsync -ax --numeric-ids /mnt/ sdp2-mount/

worked for me for Arch, Debian, Raspian images.

and df -hT:

Filesystem     Type      Size  Used Avail Use% Mounted on
/dev/nbd0p2    ext4      1.8G  505M  1.2G  30% /mnt


So, yes 1G SD should be fine.

-jh

--
Please post to: Hampshire@???
Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
LUG URL: http://www.hantslug.org.uk
--------------------------------------------------------------