maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   Gparted - Hacked from Debian for 2008 OS (https://talk.maemo.org/showthread.php?t=24679)

penguinbait 2008-10-31 18:50

Gparted - Hacked from Debian for 2008 OS
 
Qole asked me to see if I could hack a version of gparted for maemo, as it was working under Debian chroot.

This only works in flash, if you fire it up in a boot from SD partition the tablet will reboot while trying to scan /dev/mmcblk0 and /dev/mmcblk1. I assume this is because of the initfs issue with bootmenu.


The approach I took was using several debs from Debian and some compiled apps from me.

I ran into several problems, but was able to overcome all of them so far.

The install is 20MB (6MB download, 20MB on Disk, 10MB on flash)

This will also give you sudo access

Ignore the memory card corrupted errors

http://penguinbait.com/gparted-hack.deb

I think this is working well, let me know if you have any problems 11/16/08

penguinbait 2008-10-31 20:50

Re: Gparted - Hacked from Debian for 2008 OS
 
I have found an issue with formating swap partitions on this. It calls mkswap which is busybox version. I created a script called /usr/GPARTED/bin/mkswap it contains

/sbin/mkswap $3

When gparted calls it "mkswap -L "" /dev/mmcblk0p3"

mkswap for busybox does not support the -L "label"

b-man 2008-10-31 21:41

Re: Gparted - Hacked from Debian for 2008 OS
 
The download link doesn't seem to work, i keep getting a 404 error. :(

qole 2008-10-31 21:48

Re: Gparted - Hacked from Debian for 2008 OS
 
Quote:

Originally Posted by penguinbait (Post 238275)
/usr/bin/gparted is a script to fire it all up.

I will need to change the script. So if you have any ideas let me know. I was doing a umount before and a mount after, but it needs something better

Sorry, I have no ideas, that's the problem. There's some little daemon in there trying to remount mmcblk0p1 and mmcblk1p1 any time there's any change to those partitions...

penguinbait 2008-10-31 22:16

Re: Gparted - Hacked from Debian for 2008 OS
 
Quote:

Originally Posted by b-man (Post 238285)
The download link doesn't seem to work, i keep getting a 404 error. :(

DOH, nobody said anything :D:D:D

I fixed it I mistyped the name

penguinbait 2008-10-31 22:19

Re: Gparted - Hacked from Debian for 2008 OS
 
Quote:

Originally Posted by qole (Post 238287)
Sorry, I have no ideas, that's the problem. There's some little daemon in there trying to remount mmcblk0p1 and mmcblk1p1 any time there's any change to those partitions...

I will figure something out, but for now, I gotta go trick-or-treating with the kids.

Happy Halloween!!!!!!!!!!!

b-man 2008-10-31 22:38

Re: Gparted - Hacked from Debian for 2008 OS
 
Man, my frends still trick-or-treat even though there 16+.

b-man 2008-10-31 23:09

Re: Gparted - Hacked from Debian for 2008 OS
 
UPDATE: their seems to be a packaging conflict problem; Here are the errors

dpkg --install /media/mmc2/gparted-hack.deb
(Reading database ... 16121 files and directories currently installed.)
Unpacking gparted-hack (from /media/mmc2/gparted-hack.deb) ...
dpkg: error processing /media/mmc2/gparted-hack.deb (--install):
trying to overwrite `/usr/share/e2fsprogs/initrd.ext3-add-journal', which is also in package e2fsprogs
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
/media/mmc2/gparted-hack.deb

Do you think it is possible to fix this problem?, possiblly by modifing the postinstall and control file?

penguinbait 2008-10-31 23:46

Re: Gparted - Hacked from Debian for 2008 OS
 
Quote:

Originally Posted by b-man (Post 238309)
UPDATE: their seems to be a packaging conflict problem; Here are the errors

dpkg --install /media/mmc2/gparted-hack.deb
(Reading database ... 16121 files and directories currently installed.)
Unpacking gparted-hack (from /media/mmc2/gparted-hack.deb) ...
dpkg: error processing /media/mmc2/gparted-hack.deb (--install):
trying to overwrite `/usr/share/e2fsprogs/initrd.ext3-add-journal', which is also in package e2fsprogs
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
/media/mmc2/gparted-hack.deb

Do you think it is possible to fix this problem?, possiblly by modifing the postinstall and control file?

Yeah I can fix, along with the mkswap issue. I want to resolve the mounting issue before I spin up a new version.

qwerty12 2008-11-01 00:05

Re: Gparted - Hacked from Debian for 2008 OS
 
Quote:

Originally Posted by b-man (Post 238309)
UPDATE: their seems to be a packaging conflict problem; Here are the errors

dpkg --install /media/mmc2/gparted-hack.deb
(Reading database ... 16121 files and directories currently installed.)
Unpacking gparted-hack (from /media/mmc2/gparted-hack.deb) ...
dpkg: error processing /media/mmc2/gparted-hack.deb (--install):
trying to overwrite `/usr/share/e2fsprogs/initrd.ext3-add-journal', which is also in package e2fsprogs
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
/media/mmc2/gparted-hack.deb

Do you think it is possible to fix this problem?, possiblly by modifing the postinstall and control file?

The quick way to remove that problem yourself, without uninstalling anything, is to use 'dpkg -i --force-overwrite /media/mmc2/gparted-hack.deb' (or --force-all, if you are feeling gung-ho :p).

penguinbait 2008-11-01 00:13

Re: Gparted - Hacked from Debian for 2008 OS
 
Well there is a script that is called to do the mount

/usr/sbin/osso-mmc-mount and also /usr/sbin/osso-umount

I can do this

mv /usr/sbin/osso-mmc-mount /usr/sbin/osso-mmc-mount-hold
gparted
mv /usr/sbin/osso-mmc-mount-hold /usr/sbin/osso-mmc-mount

And nothing will mount, or I could edit the mount script to just exit if gparted is running?

Still looking for the best idea or suggestion.

For those not paying attention, we want to stop automounts to /media/mmc1 and 2

I also found these

gconftool-2 --type bool --set /desktop/gnome/volume_manager/automount_drives true

gconftool-2 --type bool --set /desktop/gnome/volume_manager/automount_media true

Anyone know if maemo has some corresponding entries?

b-man 2008-11-01 00:33

Re: Gparted - Hacked from Debian for 2008 OS
 
I believe that you could resolve this problem with d-bus, would that help?

penguinbait 2008-11-01 02:12

Re: Gparted - Hacked from Debian for 2008 OS
 
OK,I updated the deb, it should install alongside e2fsprogs? Please let me know?

I fixed the mkswap issue

I made a workaround for the mounting issue. It will unmount the /media/mmc1 and mmc2 when started. It will remount all when gparted exits
(feel free to find a better one, but it works)

Please do some testing, I think I am done...


NOTE**** You will still get Memory card corrupted errors from maemo but nothing will mount and the errors can be ignored.

qole 2008-11-01 02:14

Re: Gparted - Hacked from Debian for 2008 OS
 
Quote:

Originally Posted by penguinbait (Post 238319)
I also found these

gconftool-2 --type bool --set /desktop/gnome/volume_manager/automount_drives true

gconftool-2 --type bool --set /desktop/gnome/volume_manager/automount_media true

Anyone know if maemo has some corresponding entries?

There's some entries in /system, but I think they're read-only:

/system/osso/af/internal-mmc-device-present
/system/osso/af/mmc-cover-open
/system/osso/af/mmc-device-present
/system/osso/af/mmc-mount-point

That's all I could find... nothing under /desktop like on a "real" system :(

penguinbait 2008-11-01 02:17

Re: Gparted - Hacked from Debian for 2008 OS
 
see my last post :D:D
I did this

mv /usr/sbin/osso-mmc-mount.sh /usr/sbin/osso-mmc-mount.sh-hold
/usr/sbin/osso-mmc-umount.sh /media/mmc1
/usr/sbin/osso-mmc-umount.sh /media/mmc2
export LD_LIBRARY_PATH="/usr/GPARTED/lib:$LD_LIBRARY_PATH"
export PATH="/usr/GPARTED/bin:$PATH"
/usr/GPARTED/bin/gparted /dev/mmcblk0 /dev/mmcblk1
mv /usr/sbin/osso-mmc-mount.sh-hold /usr/sbin/osso-mmc-mount.sh
/etc/init.d/ke-recv restart

qole 2008-11-01 02:27

Re: Gparted - Hacked from Debian for 2008 OS
 
Thanks, I was actually typing my response (and answering the door to give out candy) when you posted that... I'll try out your deb shortly, I'm actually planning to remove a partition and grow my fat partition back out.

maacruz 2008-11-01 02:54

Re: Gparted - Hacked from Debian for 2008 OS
 
Quote:

Originally Posted by qole (Post 238287)
Sorry, I have no ideas, that's the problem. There's some little daemon in there trying to remount mmcblk0p1 and mmcblk1p1 any time there's any change to those partitions...

It is ke-recv, I think (I wrestled with it while doing my swap file in external mmc hack).

penguinbait 2008-11-01 03:11

Re: Gparted - Hacked from Debian for 2008 OS
 
Quote:

Originally Posted by maacruz (Post 238350)
It is ke-recv, I think (I wrestled with it while doing my swap file in external mmc hack).

Yes, the ke-recv is the issue, but if I turn it off and run gparted, the system reboots while scanning for devices.

So I am just using ke-recv to remount the partitions when gparted is complete.

I really don't like doing the mv, but I havn't found another way around it yet !!

heelio 2008-11-01 04:34

Re: Gparted - Hacked from Debian for 2008 OS
 
Well I tried to install it; got an "unable to install" error. I was installing from my external card in the app manager. Booted from flash.

penguinbait 2008-11-01 04:41

Re: Gparted - Hacked from Debian for 2008 OS
 
Quote:

Originally Posted by heelio (Post 238373)
Well I tried to install it; got an "unable to install" error. I was installing from my external card in the app manager. Booted from flash.

can you paste in the log from the application manager, or upload it as an attachment here.

In application manager > Open Menu > Tools > Log

heelio 2008-11-01 14:19

Re: Gparted - Hacked from Debian for 2008 OS
 
1 Attachment(s)
Here, I hope it is attached. Did I need red pill mode for this?

penguinbait 2008-11-01 16:34

Re: Gparted - Hacked from Debian for 2008 OS
 
Quote:

Originally Posted by heelio (Post 238432)
Here, I hope it is attached. Did I need red pill mode for this?

I don't see any errors from the install. Can you clear the log and try to reinstall, then paste new log if it fails again.

Thanks,

pb

heelio 2008-11-02 00:20

Re: Gparted - Hacked from Debian for 2008 OS
 
1 Attachment(s)
ok. i think there's something there this time.

penguinbait 2008-11-02 02:04

Re: Gparted - Hacked from Debian for 2008 OS
 
Quote:

Originally Posted by heelio (Post 238567)
ok. i think there's something there this time.

I need to update it again, its still conflicting with e2fsprogs

dpkg: error processing /media/mmc1/backups/gparted-hack.deb (--install):
trying to overwrite `/usr/share/locale/cs/LC_MESSAGES/e2fsprogs.mo', which is also in package e2fsprogs


I will update it when I get a chance, if you want to use it, uninstall e2fsprogs, or force install from the command line

heelio 2008-11-02 04:16

Re: Gparted - Hacked from Debian for 2008 OS
 
Haaay PB guess what happened? I did the above and IT WORKED! Gparted runs okay so far. Also, it reports that my internal MMC does have the ext2 and ext3 partitions laid out as desired, and that they are about equally used up (in other words, your program installed the two partitions and copied everything over just as it was supposed to do). The only problem is, it doesn't show the ext3 partition in the boot menu.

There any way I can edit that menu to make it show up??

penguinbait 2008-11-02 16:02

Re: Gparted - Hacked from Debian for 2008 OS
 
Quote:

Originally Posted by heelio (Post 238627)
Haaay PB guess what happened? I did the above and IT WORKED! Gparted runs okay so far. Also, it reports that my internal MMC does have the ext2 and ext3 partitions laid out as desired, and that they are about equally used up (in other words, your program installed the two partitions and copied everything over just as it was supposed to do). The only problem is, it doesn't show the ext3 partition in the boot menu.

There any way I can edit that menu to make it show up??

Did you try to install bootmenu-installer

http://penguinbait.com/bootmenu-installer.deb

This will scan for partitions and write out a new bootmenu.

Let me know

heelio 2008-11-02 16:23

Re: Gparted - Hacked from Debian for 2008 OS
 
When does that one execute? Do I have to run it or does it run automatically? I think it was already on there; when I installed it, it said it was an "update". No change to the boot menu.

penguinbait 2008-11-02 17:47

Re: Gparted - Hacked from Debian for 2008 OS
 
Quote:

Originally Posted by heelio (Post 238713)
When does that one execute? Do I have to run it or does it run automatically? I think it was already on there; when I installed it, it said it was an "update". No change to the boot menu.

Uninstall the deb and reinstall it.

the install-tools and bootmenu-installer and install-tools-ad.tgz all use /root/install-tools.

Be sure to remove install-tools and bootmenu-install before using install-tools-ad.tgz

bootmenu-installer and install-tools can be uninstalled, but they do not remove anything but the install files, it will not remove the bootmenu or the partitions..

heelio 2008-11-02 18:22

Re: Gparted - Hacked from Debian for 2008 OS
 
I uninstalled it, rebooted, no change. I reinstalled it, rebooted, still no change. My app. manager does not list install-tools or install-tools-ad among installed apps.

penguinbait 2008-11-02 18:26

Re: Gparted - Hacked from Debian for 2008 OS
 
Quote:

Originally Posted by heelio (Post 238737)
I uninstalled it, rebooted, no change. I reinstalled it, rebooted, still no change. My app. manager does not list install-tools or install-tools-ad among installed apps.


Have you tried to reinstall the install-tools-ad

It just sounds like that partition was never properly cloned.

heelio 2008-11-02 19:45

Re: Gparted - Hacked from Debian for 2008 OS
 
Okay I am giving that one more shot as I type. I might have had bootmenu-installer installed when I ran the install-tools-ad the first time, although using Gparted it looked as if it had done a successful clone (it showed a tiny FAT partition, two largeish linux partitions both having been written to, and a medium-sized swap partition). Would bootmenu-installer prevent an update to the bootmenu from the install-tools-ad program?

heelio 2008-11-02 20:08

Re: Gparted - Hacked from Debian for 2008 OS
 
okay tried that, no good. boot menu still unchanged.

penguinbait 2008-11-02 20:13

Re: Gparted - Hacked from Debian for 2008 OS
 
Quote:

Originally Posted by heelio (Post 238768)
Okay I am giving that one more shot as I type. I might have had bootmenu-installer installed when I ran the install-tools-ad the first time, although using Gparted it looked as if it had done a successful clone (it showed a tiny FAT partition, two largeish linux partitions both having been written to, and a medium-sized swap partition). Would bootmenu-installer prevent an update to the bootmenu from the install-tools-ad program?

Its possible there is some sort of conflict, as they both use /root/install-tools

Note any time you change the partition layout (for example changing the number of partitions or any of their sizes) YOU WILL HAVE TO RUN IT TWICE. So run it once, reboot and run it again.

qole 2008-11-02 20:33

Re: Gparted - Hacked from Debian for 2008 OS
 
finally tried installing this morning:

Code:

dpkg -i gparted-hack.deb
Selecting previously deselected package gparted-hack.
(Reading database ... 19253 files and directories currently installed.)
Unpacking gparted-hack (from gparted-hack.deb) ...
dpkg: error processing gparted-hack.deb (--install):
 trying to overwrite `/usr/share/locale/cs/LC_MESSAGES/e2fsprogs.mo', which is also in package e2fsprogs
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
 gparted-hack.deb


penguinbait 2008-11-02 20:43

Re: Gparted - Hacked from Debian for 2008 OS
 
Quote:

Originally Posted by qole (Post 238796)
finally tried installing this morning:

Code:

dpkg -i gparted-hack.deb
Selecting previously deselected package gparted-hack.
(Reading database ... 19253 files and directories currently installed.)
Unpacking gparted-hack (from gparted-hack.deb) ...
dpkg: error processing gparted-hack.deb (--install):
 trying to overwrite `/usr/share/locale/cs/LC_MESSAGES/e2fsprogs.mo', which is also in package e2fsprogs
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
 gparted-hack.deb


As I said a few posts back, I see the conflict with e2fsprogs is still there. You have to remove e2fsprogs, or force install on the command line. I will update the deb, I was in a hurry and missed the locale stuff last time.

I will update when I get some time. Any other issues let me know, it appears to be working great.

heelio 2008-11-02 20:45

Re: Gparted - Hacked from Debian for 2008 OS
 
Okay, I decided to try it again with a different 2 gig card I had lying around. Running it now...

penguinbait 2008-11-02 21:02

Re: Gparted - Hacked from Debian for 2008 OS
 
Quote:

Originally Posted by heelio (Post 238805)
Okay, I decided to try it again with a different 2 gig card I had lying around. Running it now...

You got me wondering if there was a problem. I just tested it, its working fine, two times install ext2 and ext3, 128 fat, 140 swap, 6 sec timeout

It should be working, good luck

heelio 2008-11-02 21:15

Re: Gparted - Hacked from Debian for 2008 OS
 
2 Attachment(s)
...and I got the exact same result.

On the first pass I got an error and the program required me to eject the card, I seem to recall it doing that on the other card also. It ran all the way through on the second try though. I am going to attach photos of the boot screen (which seems to be immortal now, there's no changing it) and the gparted screen from that last 2 gig card. Very odd that it creates 2 identical 888 meg partitions, but note that the amount used of each one is NOT identical.



Attachment 2710


Attachment 2711

penguinbait 2008-11-02 21:43

Re: Gparted - Hacked from Debian for 2008 OS
 
Why would you have to remove the card? You should not remove the card. You should reboot between each run.

So this is an n800 with 1 card installed? On internal slot?


I also maybe suggest downloading http://penguinbait.com/install-tools.ad.tgz again

Quote:

Originally Posted by heelio (Post 238815)
...and I got the exact same result.

On the first pass I got an error and the program required me to eject the card, I seem to recall it doing that on the other card also. It ran all the way through on the second try though. I am going to attach photos of the boot screen (which seems to be immortal now, there's no changing it) and the gparted screen from that last 2 gig card. Very odd that it creates 2 identical 888 meg partitions, but note that the amount used of each one is NOT identical.



Attachment 2710


Attachment 2711


heelio 2008-11-02 22:04

Re: Gparted - Hacked from Debian for 2008 OS
 
There's a 2 gig internal and a 16 gig external. Nothing has happened with the 16 gig, ever.

The install-tools-ad is what I am running. When I ran it the first time (on each 2 gig card) it gave an error some time after that "starting filesystem clone" message appears 3 times. This error suggested my ejecting the card due to some inability to write or something. Re-inserting the card and re-running the program resulted in it running all the way through. Sorry if all this was not clear.


All times are GMT. The time now is 08:34.

vBulletin® Version 3.8.8