naicheben said:
hmm, ran into a new problem: no space left on device.
How can I tell qemu to give more harddisk space to the emutaled Debian?
Now it is 1.6G on rootfs, but I think I need at least 2G better 4G (closer to reality)
Note that QEMU has actually nothing to do here, this is because the file system mounted over the loopback device gets full.
This is where you need to do one of two things:
1. 'cp -pr /mnt /your/preferred/directory' where /your/preferred/directory points to your hard disk. Then start using /your/preferred/directory for everything, you're backed by the full space available on the hard disk.
2. Resize the rootfs partition on the disk image. This way you can flash it directly to the SD card when you need it.
naicheben said:
hmm, ran into a new problem: no space left on device.
How can I tell qemu to give more harddisk space to the emutaled Debian?
Now it is 1.6G on rootfs, but I think I need at least 2G better 4G (closer to reality)
Note that QEMU has much nothing to do here, this is because the file system mounted over the loopback device gets full.
This is where you need to do one of two things:
1. '
cp -pr /mnt /your/preferred/directory' where /your/preferred/directory points to your hard disk. Then start using /your/preferred/directory for everything, you're backed by the full space available on the hard disk.
2. Resize the rootfs partition on the disk image. This way you can flash it directly to the SD card when you need it.
However, you should set up swap space properly, which is not covered.===========================================================>
root@thinkpad:/home/jvsalo/rasbpi/debian6-17-02-2012#
truncate -s 8G debian6-17-02-2012.imgroot@thinkpad:/home/jvsalo/rasbpi/debian6-17-02-2012# fdisk debian6-17-02-2012.imgCommand (m for help):
pDisk debian6-17-02-2012.img: 8589 MB, 8589934592 bytes
4 heads, 32 sectors/track, 131072 cylinders, total 16777216 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0000cded
Device Boot Start End Blocks Id System
debian6-17-02-2012.img1 2048 155647 76800 c W95 FAT32 (LBA)
debian6-17-02-2012.img2 157696 3414015 1628160 83 Linux
debian6-17-02-2012.img3 3416064 3807231 195584 82 Linux swap / Solaris
Command (m for help):
dPartition number (1-4):
3Command (m for help):
dPartition number (1-4):
2Command (m for help):
nPartition type:
p primary (1 primary, 0 extended, 3 free)
e extended
Select (default p):
pPartition number (1-4, default 2):
Using default value 2
First sector (155648-16777215, default 155648): 157696
Last sector, +sectors or +size{K,M,G} (157696-16777215, default 16777215):
Using default value 16777215
Command (m for help):
wThe partition table has been altered!
Syncing disks.
root@thinkpad:/home/jvsalo/rasbpi/debian6-17-02-2012# kpartx -a debian6-17-02-2012.imgroot@thinkpad:/home/jvsalo/rasbpi/debian6-17-02-2012# e2fsck -f /dev/mapper/loop0p2e2fsck 1.42 (29-Nov-2011)
Pass 1: Checking inodes, blocks, and sizes
Inodes that were part of a corrupted orphan linked list found. Fix<y>? yes
Inode 202 was part of the orphaned inode list. FIXED.
...
Inode 46822 was part of the orphaned inode list. FIXED.
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
/lost+found not found. Create<y>? yes
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/mapper/loop0p2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/mapper/loop0p2: 46830/101920 files (0.1% non-contiguous), 326333/407040 blocks
root@thinkpad:/home/jvsalo/rasbpi/debian6-17-02-2012# resize2fs /dev/mapper/loop0p2resize2fs 1.42 (29-Nov-2011)
Resizing the filesystem on /dev/mapper/loop0p2 to 2077440 (4k) blocks.
The filesystem on /dev/mapper/loop0p2 is now 2077440 blocks long.
root@thinkpad:/home/jvsalo/rasbpi/debian6-17-02-2012# mount /dev/mapper/loop0p2 /mntroot@thinkpad:/home/jvsalo/rasbpi/debian6-17-02-2012# df -hFilesystem Size Used Avail Use% Mounted on
/dev/mapper/loop0p2 8.0G 1.4G 6.2G 18% /mnt
<===========================================================
I'm actually a bit worried about the fsck errors there. Nothing was copied to lost+found. This makes me ask, did they publish a messed up ext volume? Why?