amonk
|
2013-12-24
, 10:58
|
Posts: 5 |
Thanked: 3 times |
Joined on Dec 2013
@ cipher
|
#11
|
|
2014-01-04
, 08:45
|
Posts: 17 |
Thanked: 0 times |
Joined on Dec 2013
|
#12
|
Hi,
i kind of hated that on the nokia N9 there are 3 partitions:
and MyDocs is a huge vfat partition which sucks in my opinion.Code:/dev/mmcblkp1 as MyDocs /dev/mmcblkp2 as / /dev/mmcblkp3 as /home
So i figured out you could use sfdisk to reformat the partitions while running in harmattan (openmode, don't know if that matters, but i think it doesn't) and even use ext3 or something else as partition type for the new partitions you might add. If you dont want to add a partition you can just set the partition type of partition 1 to Linux, will work just as good but i liked to have a small FAT partition for swapping files between operating systems at home, university and so on...
my partition table looks like this now:
NOTE that the partition table is out of order, but for me everything works perfectly and i didn't want to touch the rootfs and /home partitions so i'd be safe and don't mess my installation up.Code:# /sbin/sfdisk -l /dev/mmcblk0 Disk /dev/mmcblk0: 1957120 cylinders, 4 heads, 16 sectors/track Units = cylinders of 32768 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/mmcblk0p1 16 100015 100000 3200000 c W95 FAT32 (LBA) /dev/mmcblk0p2 1760512 1891583 131072 4194304 83 Linux /dev/mmcblk0p3 1891584 1957119 65536 2097152 83 Linux /dev/mmcblk0p4 100016 1760511 1660496 53135872 83 Linux
But only the first partition gets registered to a host if connected via usb so i changed /etc/usb-moded/usb-moded.ini to this:
Now i can see both partitions on my desktop if connected via usb. I hope this helps.Code:# cat /etc/usb-moded/usb-moded.ini [mountpoints] mount = /dev/mmcblk0p1,/dev/mmcblk0p4 #you can add more filesystems to the mount option, by making it a comma-seperated list. [sync] nofua = 1 [altmount] mount = /home/user/MyDocs,/mnt [cdrom] path = /usr/share/aceso/aceso.iso timeout = 1
to use sfdisk to change the first partition use this command (after devel-su):
(-N1 makes sure you only edit the first partition)Code:/sbin/sfdisk --no-reread /dev/mmcblk0 -N1
and to modify the 4 partition use (obviously):
you have to specify start, size and type after you've executed the command. When editing the first partition start should be 16, size should be something you like (i think the program warns you if you choose a too big size) and the type should be c for W95 FAT32 (LBA).Code:/sbin/sfdisk --no-reread /dev/mmcblk0 -N4
for the fourth partition for start use the end of the first partition +1 and size again something you like (probably everything that is left) and type can be anything you like, i choose L which automatically uses a Linux type for the partition.
step by step execution should look something like this:
(i created this log after i did the setup on my device so the settings where already there, the sfdisk output should be different for you, partition 4 most likely won't exist yet).
Then edit /etc/usb-moded/usb-moded.ini according to your needs. Then reboot the device and hope for the best.Code:# /sbin/sfdisk --no-reread /dev/mmcblk0 -N1 Disk /dev/mmcblk0: 1957120 cylinders, 4 heads, 16 sectors/track Old situation: Units = cylinders of 32768 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/mmcblk0p1 16 100015 100000 3200000 c W95 FAT32 (LBA) /dev/mmcblk0p2 1760512 1891583 131072 4194304 83 Linux /dev/mmcblk0p3 1891584 1957119 65536 2097152 83 Linux /dev/mmcblk0p4 100016 1760511 1660496 53135872 83 Linux Input in the following format; absent fields get a default value. <start> <size> <type [E,S,L,X,hex]> <bootable [-,*]> <c,h,s> <c,h,s> Usually you only need to specify <start> and <size> (and perhaps <type>). /dev/mmcblk0p1 :16 100000 c /dev/mmcblk0p1 16 100015 100000 3200000 c W95 FAT32 (LBA) New situation: Units = cylinders of 32768 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/mmcblk0p1 16 100015 100000 3200000 c W95 FAT32 (LBA) /dev/mmcblk0p2 1760512 1891583 131072 4194304 83 Linux /dev/mmcblk0p3 1891584 1957119 65536 2097152 83 Linux /dev/mmcblk0p4 100016 1760511 1660496 53135872 83 Linux Warning: no primary partition is marked bootable (active) This does not matter for LILO, but the DOS MBR will not boot this disk. Do you want to write this to disk? [ynq] y 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 If you created or changed a DOS partition, /dev/foo7, say, then use dd(1) to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1 (See fdisk(8).) ~ # /sbin/sfdisk --no-reread /dev/mmcblk0 -N4 Disk /dev/mmcblk0: 1957120 cylinders, 4 heads, 16 sectors/track Old situation: Units = cylinders of 32768 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/mmcblk0p1 16 100015 100000 3200000 c W95 FAT32 (LBA) /dev/mmcblk0p2 1760512 1891583 131072 4194304 83 Linux /dev/mmcblk0p3 1891584 1957119 65536 2097152 83 Linux /dev/mmcblk0p4 100016 1760511 1660496 53135872 83 Linux Input in the following format; absent fields get a default value. <start> <size> <type [E,S,L,X,hex]> <bootable [-,*]> <c,h,s> <c,h,s> Usually you only need to specify <start> and <size> (and perhaps <type>). /dev/mmcblk0p4 :100016 99999999 L Warning: given size (32891135) exceeds max allowable size (1660496) /dev/mmcblk0p4 :100016 1660496 L /dev/mmcblk0p4 100016 1760511 1660496 53135872 83 Linux New situation: Units = cylinders of 32768 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/mmcblk0p1 16 100015 100000 3200000 c W95 FAT32 (LBA) /dev/mmcblk0p2 1760512 1891583 131072 4194304 83 Linux /dev/mmcblk0p3 1891584 1957119 65536 2097152 83 Linux /dev/mmcblk0p4 100016 1760511 1660496 53135872 83 Linux Warning: no primary partition is marked bootable (active) This does not matter for LILO, but the DOS MBR will not boot this disk. Do you want to write this to disk? [ynq] y 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 If you created or changed a DOS partition, /dev/foo7, say, then use dd(1) to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1 (See fdisk(8).)
After rebooting you can format the partitions using the mkfs commands, like (after devel-su):
if you want to have it mount your fourth partition if you boot or disconnect the device from usb you need to change your /etc/fstab, i used this:Code:/sbin/mkfs.vfat /dev/mmcblk0p1 /sbin/mkfs.ext3 /dev/mmcblk0p4
Code:# cat /etc/fstab rootfs / rootfs defaults,errors=remount-ro,noatime 0 0 /dev/mmcblk0p3 /home ext4 rw,noatime,errors=remount-ro,barrier=1 0 0 /dev/mmcblk0p1 /home/user/MyDocs vfat noauto,nodev,noexec,nosuid,noatime,nodiratime,utf8,uid=29999,shortname=mixed,dmask=000,fmask=0133,rodir 0 0 /dev/mmcblk0p4 /mnt ext4 rw,noatime,errors=remount-ro,barrier=1 0 0 ubi0:var /var ubifs noauto,no_chk_data_crc,bulk_read
|
2014-06-22
, 08:30
|
|
Posts: 157 |
Thanked: 36 times |
Joined on Mar 2013
|
#13
|
~# /sbin/sfdisk -l /dev/mmcblk0 Disk /dev/mmcblk0: 485120 cylinders, 4 heads, 16 sectors/track Units = cylinders of 32768 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/mmcblk0p1 16 160511 160496 5135872 c W95 FAT32 (LBA) /dev/mmcblk0p2 288512 419583 131072 4194304 83 Linux /dev/mmcblk0p3 419584 485119 65536 2097152 83 Linux /dev/mmcblk0p4 160512 288511 128000 4096000 83 Linux
/sbin/sfdisk --no-reread /dev/mmcblk0 -N4
/sbin/sfdisk --no-reread /dev/mmcblk0 -N1
|
2014-06-22
, 08:45
|
|
Posts: 6,436 |
Thanked: 12,701 times |
Joined on Nov 2011
@ Ängelholm, Sweden
|
#14
|
|
2014-06-22
, 09:22
|
|
Posts: 157 |
Thanked: 36 times |
Joined on Mar 2013
|
#15
|
|
2014-06-22
, 12:41
|
Community Council |
Posts: 4,920 |
Thanked: 12,867 times |
Joined on May 2012
@ Southerrn Finland
|
#16
|
gparted isn't available on windows , can't I just use terminal with this method ?
The Following User Says Thank You to juiceme For This Useful Post: | ||
|
2014-06-22
, 13:02
|
|
Posts: 439 |
Thanked: 282 times |
Joined on Oct 2012
|
#17
|
gparted isn't available on windows , can't I just use terminal with this method ?
The Following User Says Thank You to Alecsandru For This Useful Post: | ||
|
2014-06-22
, 19:47
|
|
Posts: 4,118 |
Thanked: 8,901 times |
Joined on Aug 2010
@ Ruhrgebiet, Germany
|
#18
|
|
2014-06-23
, 02:34
|
|
Posts: 6,436 |
Thanked: 12,701 times |
Joined on Nov 2011
@ Ängelholm, Sweden
|
#19
|
|
2014-06-24
, 16:50
|
|
Posts: 157 |
Thanked: 36 times |
Joined on Mar 2013
|
#20
|