maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   Partitioning Problem (https://talk.maemo.org/showthread.php?t=82064)

udaychaitanya16 2012-02-02 19:18

Partitioning Problem
 
worst thing happened to me.I wanted to re partition my emmc and 16 GB sd card.I started with making a live usb of Gparted since I could not un mount FAT partition of N900 from my installed Gparted in my computer.

Before that I read a wiki about partitioning.It suggested to have backupmenu.so I installed that and backed up root and opt.Booted gparted and it could see the partitions on emmc.

Then I did silly,funny partitioning.I gave 3GB for ED and called it debian,3GB with a lable home,768Mb as linux swap.I gave the lables on Gparted only.

In case of sd card I have allocated 1GB space for linux swap.

It was a successful operation until I realized that I could not back up any thing from backupmenu.Then it went into reboot loop.I had to flash it.That was not a problem since I have downloaded image with me always.

After that the first thing I did was to install rootsh.It installed flawless but I could not upgrade it because I dont have enough memory to upgrade it. I could not understand what df -h gave me nor can paste it since I dont have ssh.In the settings menu it told me I have literally 1 KB available.I wanted to have 3 GB available for installable applications and ended up with 1 KB.

Now that I have flashed and no space for installable applications I can not have back up menu.Is it needed to partition

Any help will be greately appreciated

Estel 2012-02-02 19:27

Re: Partitioning Problem
 
1. Start device in backupmenu mode
2. connect it to gparted live [whatever] and select (on device) "mass-storage mode: read&write".
3. You should see your partition scheme in gparted. Check what5 went wrong, and re-repartition it, when appropriate.

Remember, that You can only restore backupmenu backups for same kernel version, as one that was on device, when You created backup. So, if You backuped with kernel-power from -devel, be sure to install it, before trying to restore backup.

In worst case, You can flash everything (including vanilla eMMC layout), and try repartitioning again.

Also, keep in mind, that You should not use ext4 for home partition, if You're not using kernel-power *and/or* You don't know how to modify backupmenu to work with it. In such case, stay with ext3, You aren't losing much.

Please write about actual outcome.

/Estel

// Edit

I see, that you can't install backupmenu, due to small /home + opt. One way, would be to re-partition from terminal as in Wiki article, yet it's pretty complicated (at least, enough to scare me away from this approach, so I'm unable to provide assistance on this method).

Other thing You can do, is to re-flash completely (including vanilla eMMC layout). It's no big deal, as You've juast reflashed COMBINED, and You have backups. So, I recommend the latter method.

udaychaitanya16 2012-02-03 13:13

Re: Partitioning Problem
 
I have reflashed the device completely as suggested.Now I have 1.86 GB available for installable applications.I still want to repartition the emmc for dedicated partition for EasyDebian.Someone please point me to a guide where I can do it safely.Gparted looks like a safe thing to me but it wants to erase the contents of the partitions before repartitioning.I dont know how to work with that even after reading a full length tutorial about that.What I want is
1.3GB partition on emmc for Easy Debian
2.768 MB swap space on my SD card.

I read the wiki but I am unable to understand it fully.

It will be of immense help to me if somebody offer suggestions.

Thank you

michaaa62 2012-02-03 14:17

Re: Partitioning Problem
 
Download Gparted-Live-CD.iso file or any Linux-Live-CD image containing gparted application
Burn Gparted-Live-CD to CD or DVD
Install Backupmenu to your N900
Reboot the N900 with keyboard ejected
In Bootmenu type 'w' to export the partitions in read/write-mode
Boot your PC from the Live-CD
If necessary start gparted
Choose the device (hard disk) in the upper right drop down menu should be some 30GB size.
Right click the first partition (approx27GB) and choose 'Resize or Move', use the right handle to shrink the partition.
Click 'Resize'-button (Dont worry you will be asked to apply actions later)
Right click on the free space between the first and the second partition (approx.2GB) and choose 'New', choose a file-system and add a label for easier identification.
Do not touch the third, aka swap-partition.
Now click apply in the upper toolbar and accept the changes to be applied.
Just do the same for the external card from the dropdown menu above.
If everything is resized successfully, shut down the PC
On the N900 press 'q' to quit backupmenu and restart Maemo.

udaychaitanya16 2012-02-03 16:34

Re: Partitioning Problem
 
Thanks michaaa62 for the help.Now that I have created a partition named debian on emmc I have to mount it.Here is my fstab output

Code:

# autogenerated
rootfs / rootfs defaults,errors=remount-ro,noatime 0 0
/dev/mmcblk0p1 /home/user/MyDocs vfat noauto,nodev,noexec,nosuid,noatime,nodirat
/dev/mmcblk0p2 /home ext3 rw,noatime,errors=continue,commit=1,data=writeback 0 0
/home/opt /opt none bind
/dev/mmcblk0p3 none swap sw 0 0

Did I really made a 3GB partition?If so how can I mount it?When i tried to mount that it says device is busy

And the df -h output is this
Nokia-N900:/#
Code:

df -h
Filesystem                Size      Used Available Use% Mounted on
rootfs                  227.9M    133.7M    90.0M  60% /
ubi0:rootfs            227.9M    133.7M    90.0M  60% /
tmpfs                    1.0M    88.0k    936.0k  9% /tmp
tmpfs                  256.0k    72.0k    184.0k  28% /var/run
none                    10.0M    88.0k      9.9M  1% /dev
tmpfs                    64.0M      4.0k    64.0M  0% /dev/shm
/dev/mmcblk0p2            2.0G    236.3M      1.6G  12% /home
/home/opt                2.0G    236.3M      1.6G  12% /opt
/opt/pymaemo/usr/lib/python2.5
                          2.0G    236.3M      1.6G  12% /usr/lib/python2.5
/opt/pymaemo/usr/share/pyshared
                          2.0G    236.3M      1.6G  12% /usr/share/pyshared
/opt/pymaemo/usr/lib/pyshared
                          2.0G    236.3M      1.6G  12% /usr/lib/pyshared
/opt/pymaemo/usr/share/python-support
                          2.0G    236.3M      1.6G  12% /usr/share/python-support
/opt/pymaemo/usr/lib/python-support
                          2.0G    236.3M      1.6G  12% /usr/lib/python-support
/dev/mmcblk1p1          13.8G    64.0k    13.8G  0% /media/mmc1
/dev/mmcblk0p1          24.0G      3.7G    20.3G  16% /home/user/MyDocs


udaychaitanya16 2012-02-03 17:51

Re: Partitioning Problem
 
Any one please?

michaaa62 2012-02-03 18:19

Re: Partitioning Problem
 
The fstab is auto-generated by a script, which does only look for the entries you have, nothing more.
You will have to edit this script for your new partition to get mounted during boot later. Please show the output of
Code:

sudo gainroot
sfdisk -l

to look for the partitions. Then check the file system to be sure that the system really will work with your partition
Code:

lshal | grep volume
will show all the file systems and the

udaychaitanya16 2012-02-03 18:24

Re: Partitioning Problem
 
Thanks for the reply

sfdisk -l output is

Code:

Nokia-N900:~# sfdisk -l         

Disk /dev/mmcblk0: 977024 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          1  786591  786591  25170912    c  W95 FAT32 (LBA)
                end: (c,h,s) expected (1023,3,16) found (1023,63,32)
/dev/mmcblk0p2    884865  950400  65536    2097152  83  Linux
/dev/mmcblk0p3    950401  974976  24576    786432  82  Linux swap / Solaris
/dev/mmcblk0p4    786592  884863  98272    3144704  83  Linux
                start: (c,h,s) expected (1023,3,16) found (1023,63,32)
                end: (c,h,s) expected (1023,3,16) found (1023,63,32)

Disk /dev/mmcblk1: 486192 cylinders, 4 heads, 16 sectors/track
Warning: The partition table looks like it was made
  for C/H/S=*/255/63 (instead of 486192/4/16).
For this listing I'll assume that geometry.
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

  Device Boot Start    End  #cyls    #blocks  Id  System
/dev/mmcblk1p1          0+  1809-  1810-  14533632    b  W95 FAT32
/dev/mmcblk1p2      1809+  1936-    128-  1022976  82  Linux swap / Solaris
/dev/mmcblk1p3          0      -      0          0    0  Empty
/dev/mmcblk1p4          0      -      0          0    0  Empty
Nokia-N900:~#


udaychaitanya16 2012-02-03 18:26

Re: Partitioning Problem
 
[CODE]Nokia-N900:~# lshal | grep volume
block.is_volume = false (bool)
udi = '/org/freedesktop/Hal/devices/volume_uuid_ab8da96c_f992_4e5c_8bc0_bfb814427c5a'
block.is_volume = true (bool)
info.capabilities = {'volume', 'block'} (string list)
info.category = 'volume' (string)
info.udi = '/org/freedesktop/Hal/devices/volume_uuid_ab8da96c_f992_4e5c_8bc0_bfb814427c5a' (string)
volume.block_size = 512 (0x200) (int)
volume.fstype = 'ext3' (string)
volume.fsusage = 'filesystem' (string)
volume.fsversion = '1.0' (string)
volume.ignore = false (bool)
volume.is_disc = false (bool)
volume.is_mounted = false (bool)
volume.is_mounted_read_only = false (bool)
volume.is_partition = true (bool)
volume.label = 'debian' (string)
volume.linux.is_device_mapper = false (bool)
volume.mount.valid_options = {'ro', 'sync', 'dirsync', 'noatime', 'nodiratime', 'noexec', 'quiet', 'remount', 'exec', 'acl', 'user_xattr', 'data='} (string list)
volume.mount_point = '' (string)
volume.num_blocks = 6289408 (0x5ff800) (uint64)
volume.partition.flags = {} (string list)
volume.partition.label = '' (string)
volume.partition.media_size = 32015122432 (0x774400000) (uint64)
volume.partition.number = 4 (0x4) (int)
volume.partition.scheme = 'mbr' (string)
volume.partition.start = 25775046656 (0x600500000) (uint64)
volume.partition.type = '0x83' (string)
volume.partition.uuid = '' (string)
volume.size = 3220176896 (0xbff00000) (uint64)
volume.unmount.valid_options = {'lazy'} (string list)
volume.uuid = 'ab8da96c-f992-4e5c-8bc0-bfb814427c5a' (string)
udi = '/org/freedesktop/Hal/devices/volume_uuid_0a1bc5ed_ce17_4647_b79f_3116a4a13611'
block.is_volume = true (bool)
info.capabilities = {'volume', 'block'} (string list)
info.category = 'volume' (string)
info.udi = '/org/freedesktop/Hal/devices/volume_uuid_0a1bc5ed_ce17_4647_b79f_3116a4a13611' (string)
volume.block_size = 512 (0x200) (int)
volume.fstype = 'ext3' (string)
volume.fsusage = 'filesystem' (string)
volume.fsversion = '1.0' (string)
volume.ignore = false (bool)
volume.is_disc = false (bool)
volume.is_mounted = true (bool)
volume.is_mounted_read_only = false (bool)
volume.is_partition = true (bool)
volume.label = '' (string)
volume.linux.is_device_mapper = false (bool)
volume.mount.valid_options = {'ro', 'sync', 'dirsync', 'noatime', 'nodiratime', 'noexec', 'quiet', 'remount', 'exec', 'acl', 'user_xattr', 'data='} (string list)
volume.mount_point = '/home' (string)
volume.num_blocks = 4194304 (0x400000) (uint64)
volume.partition.flags = {} (string list)
volume.partition.label = '' (string)
volume.partition.media_size = 32015122432 (0x774400000) (uint64)
volume.partition.number = 2 (0x2) (int)
volume.partition.scheme = 'mbr' (string)
volume.partition.start = 28995256320 (0x6c0408000) (uint64)
volume.partition.type = '0x83' (string)
volume.partition.uuid = '' (string)
volume.size = 2147483648 (0x80000000) (uint64)
volume.unmount.valid_options = {'lazy'} (string list)
volume.uuid = '0a1bc5ed-ce17-4647-b79f-3116a4a13611' (string)
udi = '/org/freedesktop/Hal/devices/volume_part3_size_805306368'
block.is_volume = true (bool)
info.capabilities = {'volume', 'block'} (string list)
info.category = 'volume' (string)
info.udi = '/org/freedesktop/Hal/devices/volume_part3_size_805306368' (string)
volume.block_size = 512 (0x200) (int)
volume.fstype = 'swap' (string)
volume.fsusage = 'other' (string)
volume.fsversion = '2' (string)
volume.is_disc = false (bool)
volume.is_mounted = false (bool)
volume.is_mounted_read_only = false (bool)
volume.is_partition = true (bool)
volume.label = '' (string)
volume.linux.is_device_mapper = false (bool)
volume.mount_point = '' (string)
volume.num_blocks = 1572864 (0x180000) (uint64)
volume.partition.flags = {} (string list)
volume.partition.label = '' (string)
volume.partition.media_size = 32015122432 (0x774400000) (uint64)
volume.partition.number = 3 (0x3) (int)
volume.partition.scheme = 'mbr' (string)
volume.partition.start = 31142739968 (0x740408000) (uint64)
volume.partition.type = '0x82' (string)
volume.partition.uuid = '' (string)
volume.size = 805306368 (0x30000000) (uint64)
volume.uuid = '' (string)
udi = '/org/freedesktop/Hal/devices/volume_uuid_4BB1_E781'
block.is_volume = true (bool)
info.capabilities = {'volume', 'block'} (string list)
info.category = 'volume' (string)
info.udi = '/org/freedesktop/Hal/devices/volume_uuid_4BB1_E781' (string)
volume.block_size = 512 (0x200) (int)
volume.fstype = 'vfat' (string)
volume.fsusage = 'filesystem' (string)
volume.fsversion = 'FAT32' (string)
volume.ignore = false (bool)
volume.is_disc = false (bool)
volume.is_mounted = true (bool)
volume.is_mounted_read_only = false (bool)
volume.is_partition = true (bool)
volume.label = 'Nokia N900' (string)
volume.linux.is_device_mapper = false (bool)
volume.mount.valid_options = {'ro', 'sync', 'dirsync', 'noatime', 'nodiratime', 'noexec', 'quiet', 'remount', 'exec', 'utf8', 'shortname=', 'codepage=', 'iocharset=', 'umask=', 'dmask=', 'fmask=', 'uid=', 'flush'} (string list)
volume.mount_point = '/home/user/MyDocs' (string)
volume.num_blocks = 50341824 (0x30027c0) (uint64)
volume.partition.flags = {} (string list)
volume.partition.label = '' (string)
volume.partition.media_size = 32015122432 (0x774400000) (uint64)
volume.partition.number = 1 (0x1) (int)
volume.partition.scheme = 'mbr' (string)
volume.partition.start = 32768 (0x8000) (uint64)
volume.partition.type = '0x0c' (string)
volume.partition.uuid = '' (string)
volume.size = 25775013888 (0x6004f8000) (uint64)
volume.unmount.valid_options = {'lazy'} (string list)
volume.uuid = '4BB1-E781' (string)
block.is_volume = false (bool)
udi = '/org/freedesktop/Hal/devices/volume_uuid_06c6b944_9757_4f1c_97d2_ebbf564dda3b'
block.is_volume = true (bool)
info.capabilities = {'volume', 'block'} (string list)
info.category = 'volume' (string)
info.udi = '/org/freedesktop/Hal/devices/volume_uuid_06c6b944_9757_4f1c_97d2_ebbf564dda3b' (string)
volume.block_size = 512 (0x200) (int)
volume.fstype = 'swap' (string)
volume.fsusage = 'other' (string)
volume.fsversion = '2' (string)
volume.is_disc = false (bool)
volume.is_mounted = false (bool)
volume.is_mounted_read_only = false (bool)
volume.is_partition = true (bool)
volume.label = '' (string)
volume.linux.is_device_mapper = false (bool)
volume.mount_point = '' (string)
volume.num_blocks = 2045952 (0x1f3800) (uint64)
volume.partition.flags = {} (string list)
volume.partition.label = '' (string)
volume.partition.media_size = 15931539456 (0x3b5980000) (uint64)
volume.partition.number = 2 (0x2) (int)
volume.partition.scheme = 'mbr' (string)
volume.partition.start = 14883487744 (0x377200000) (uint64)
volume.partition.type = '0x82' (string)
volume.partition.uuid = '' (string)
volume.size = 1047527424 (0x3e700000) (uint64)
volume.uuid = '06c6b944-9757-4f1c-97d2-ebbf564dda3b' (string)
udi = '/org/freedesktop/Hal/devices/volume_uuid_5009_A603'
block.is_volume = true (bool)
info.capabilities = {'volume', 'block'} (string list)
info.category = 'volume' (string)
info.udi = '/org/freedesktop/Hal/devices/volume_uuid_5009_A603' (string)
volume.block_size = 512 (0x200) (int)
volume.fstype = 'vfat' (string)
volume.fsusage = 'filesystem' (string)
volume.fsversion = 'FAT32' (string)
volume.ignore = false (bool)
volume.is_disc = false (bool)
volume.is_mounted = true (bool)
volume.is_mounted_read_only = false (bool)
volume.is_partition = true (bool)
volume.label = '' (string)
volume.linux.is_device_mapper = false (bool)
volume.mount.valid_options = {'ro', 'sync', 'dirsync', 'noatime', 'nodiratime', 'noexec', 'quiet', 'remount', 'exec', 'utf8', 'shortname=', 'codepage=', 'iocharset=', 'umask=', 'dmask=', 'fmask=', 'uid=', 'flush'} (string list)
volume.mount_point = '/media/mmc1' (string)
volume.num_blocks = 29067264 (0x1bb8800) (uint64)
volume.partition.flags = {} (string list)
volume.partition.label = '' (string)
volume.partition.media_size = 15931539456 (0x3b5980000) (uint64)
volume.partition.number = 1 (0x1) (int)
volume.partition.scheme = 'mbr' (string)
volume.partition.start = 1048576 (0x100000) (uint64)
volume.partition.type = '0x0b' (string)
volume.partition.uuid = '' (string)
volume.size = 14882439168 (0x377100000) (uint64)
volume.unmount.valid_options = {'lazy'} (string list)
volume.uuid = '5009-A603' (string)

michaaa62 2012-02-03 18:32

Re: Partitioning Problem
 
What's the output of the 'sfdisk -l' code
Did you try to add a logical or primary partition?

udaychaitanya16 2012-02-03 18:44

Re: Partitioning Problem
 
sfdisk -l output is there in the post number 8.Everything is primary partition only.

shame on me that I got my thanks button disappeared.Even after I have confirmed my email change its not returning.

Thanks for your time man.

udaychaitanya16 2012-02-03 18:46

Re: Partitioning Problem
 
Again I have fired up gparted and saw the partition named debian is there.But I am unable to recognise it in N900 as mmcblk0p1,2,3,or 4.And I dont know how to mount it .

michaaa62 2012-02-03 18:54

Re: Partitioning Problem
 
Maemo is kind of dumb, it was developed to be that way...

Try to check the file system
Code:

sudo gainroot
fsck -af /dev/mmcblk0p4


udaychaitanya16 2012-02-03 18:57

Re: Partitioning Problem
 
here is the output
Code:

fsck -af /dev/mmcblk0p4
fsck 1.41.3.maemo0 (12-Oct-2008)
debian: 11/196608 files (0.0% non-contiguous), 29901/786176 blocks


michaaa62 2012-02-03 19:03

Re: Partitioning Problem
 
You need to create a mount point for the device, like /media/easy_debian.
Code:

mkdir /media/easy_debian
Open /etc/event.d/rcS-late with an editor,
Code:

nano /etc/event.d/rcS-late
find the line
Quote:

-f /usr/lib/genfstab.awk > $tmp_fstab
and add this below it
Code:

echo "/dev/mmcblk0p4 /media/easy_debian ext3 rw,noatime,errors=continue,commit=1,data=writeback 0 0" >> $tmp_fstab
After a reboot, please verify that it work.

udaychaitanya16 2012-02-03 19:10

Re: Partitioning Problem
 
But what I want is the image file of easy debian should be mounted to dedicated partition which is there on emmc I think:confused:

michaaa62 2012-02-03 19:23

Re: Partitioning Problem
 
My experience with easy debian was years ago, so bear with me if the following is not up-to-date.

The EasyDebian is a file which will get unzipped and mounted itself as a loopback device, and an application is kind of changerooting into that mount point. There is no separate device necessary for that, until you unpack the file to the device and mount this device always to the location, where the script of easy debian looks for the loopback file. This should be done via fstab entry.

udaychaitanya16 2012-02-03 19:25

Re: Partitioning Problem
 
Now I have made directory named ed as a mount point and changed the code given to replace just "ed" and edited and rebooted.Now where should i copy the debian image file.Thank you.

udaychaitanya16 2012-02-03 19:30

Re: Partitioning Problem
 
Thank you.Infact I am trying out Estel's image which should be manually placed into the mount point.Qoles installer does not automatically recognise the newer image of Estel.I will try my luck with what you have taught to me till now.And I will track you down all over TMO as soon as my Thanks button is activated.Thanks again for your valuable time .

michaaa62 2012-02-03 19:36

Re: Partitioning Problem
 
I am unsure if you want to just place the downloaded image file onto that partition or if you want to extract the image file folder by folder as if it is an installed system? Is this a workable way for easy debian at all? As i said, do not know much about it.

The difference: The script would look for /ed/debian*.img* , if you configure it in /home/user/.chroot
while the latter will have folders /bin, /etc, ... in /ed

udaychaitanya16 2012-02-03 19:38

Re: Partitioning Problem
 
This is what I am trying

michaaa62 2012-02-03 19:40

Re: Partitioning Problem
 
Quote:

Originally Posted by udaychaitanya16 (Post 1160074)
Thank you.Infact I am trying out Estel's image which should be manually placed into the mount point.Qoles installer does not automatically recognise the newer image of Estel.I will try my luck with what you have taught to me till now.And I will track you down all over TMO as soon as my Thanks button is activated.Thanks again for your valuable time .

Good luck and take extra care with these 'experimental' features :D

udaychaitanya16 2012-02-03 19:42

Re: Partitioning Problem
 
haha .Thank you very much.

michaaa62 2012-02-03 20:03

Re: Partitioning Problem
 
Quote:

Originally Posted by udaychaitanya16 (Post 1160078)
This is what I am trying

Basically you have to use a temporary mount point like /mnt for the loopback device and mount /dev/mmcblk0p4 to /ed to copy everything from /mnt to /ed
Code:

sudo gainroot
mount -o loop /path/to/ed-squeeze-final.ext3 /mnt
mount /dev/mmcblk0p4 /ed
cp -a /mnt/* /ed


Estel 2012-02-04 15:29

Re: Partitioning Problem
 
Also, don't edit any Maemo scripts to mount Ed partition... ED chroot will mount everything for You when needed. Also, mount point /.debian/ is created automatically during ED installation.

All you have to do, is to mount Your newly created partition (You can do it even from Gpared liveCD, it doesn't need to be done from within Maemo itself), mount Your image via loopback command, and copy Ed content.

On ED thread, eight wrote step-by-step instruction about mounting and copying if You have partition created already - check it for instructions.

/Estel


All times are GMT. The time now is 22:46.

vBulletin® Version 3.8.8