![]() |
2010-07-06
, 09:38
|
|
Posts: 577 |
Thanked: 699 times |
Joined on Feb 2010
@ Malta
|
#2
|
![]() |
2010-07-06
, 18:03
|
Posts: 6 |
Thanked: 0 times |
Joined on Jul 2010
|
#3
|
I have copied files from /home to my SD card (cp -a /home /mnt/card). I just wanted to resize vfat (MyDocs) to 8Gb and leave all remaining space to /home. I had unmonted /home/user/MyDocs. /opt and /home could not be unmounted even with -f.
Sadly, the following commands lead me to disaster.
# swapoff -a
# cat partitions
0 8192 c
8192 20740 83
28932 768 82
# sfdisk -uM --no-reread /dev/mmcblk0 < partitions
Disk /dev/mmcblk0: 977024 cylinders, 4 heads, 16 sectors/track
Old situation:
Units = mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End MiB #blocks Id System
/dev/mmcblk0p1 0+ 27652- 27652 28315648 c W95 FAT32 (LBA)
/dev/mmcblk0p2 27652+ 29700- 2048 2097152 83 Linux
/dev/mmcblk0p3 29700+ 30468- 768 786432 82 Linux swap / Solaris
/dev/mmcblk0p4 0 - 0 0 0 Empty
New situation:
Units = mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End MiB #blocks Id System
/dev/mmcblk0p1 0+ 8191 8192- 8388607+ c W95 FAT32 (LBA)
/dev/mmcblk0p2 8192 28931 20740 21237760 83 Linux
/dev/mmcblk0p3 28932 29699 768 786432 82 Linux swap / Solaris
/dev/mmcblk0p4 0 - 0 0 0 Empty
Warning: no primary partition is marked bootable (active)
This does not matter for LILO, but the DOS MBR will not boot this disk.
Successfully wrote the new partition table
Re-reading the partition table ...
BLKRRPART: Device or resource busy
The command to re-read the partition table failed
Reboot your system now, before using mkfs
# reboot
So n900 does not boot anymore (only "NOKIA" caption appears and then it reboots). Sometimes it also reads "The device is malfunctioning, reboot in 10s".
I read http://wiki.maemo.org/User:Ruskie#Repartitioning instructions but I have no experience with sfdisk before.
Last edited by sv75; 2010-07-06 at 09:37.