OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> increasing the root partition, maximizing and minimizing the install
sonicbuddha
post Oct 29 2004, 07:44 AM
Post #1





Group: Members
Posts: 38
Joined: 18-October 04
Member No.: 5,080



I am new to the Zaurus but a long time Linux user. I just picked up a c860 and started experimenting with roms and, although the cacko rom is fantastic, I find pdaXrom exactly what I was looking for- the perfect lil geeking tool! I could not live without xwindows. There are a few things that I would like to do to optimize my install and before I go breaking things, I'd like some advice. I'd like to:

1) Increase the size of the root partition to its maximum size. On this partition install all the apps required for running the os. Non-essential apps can be installed on the sd or cf cards.
2) Move the home partition for users (other than root) to the sd card. Login only as a sudo enabled non-root user.
3) Remap the root home directory to /root, just in case the sd card failed or was removed to assure the machine can still be logged in this situation. Yes, I know this can easily be done in /etc/passwd.
4) Remap the /home/tmp/ipkg to /var/ipkg for the same reason listed above (it also seems to make more sense, based on both rpm and apt).
5) Partition the sd card so that the home directories can be stored on a ext2/3 filesystem while leaving another partition to be left open for flashing rom updates.

Lastly, in the install process I applied the patch that enabled me to increase the root partition usage to 128Mb. What exactly does this imply? How does this relate to the NAND vs internal flash ram?

I realize that many of these issues may have been covered in other threads. Feel free to just point me in that direction.

Thanks!
Oh, and pdaXrom really rocks! Thanks for making may Zaurus experience even more than I could have expected!
Go to the top of the page
 
+Quote Post
xiaman
post Oct 29 2004, 10:37 AM
Post #2





Group: Members
Posts: 63
Joined: 25-July 04
Member No.: 4,098



these are things i think should be included in the next rom.
Go to the top of the page
 
+Quote Post
sonicbuddha
post Oct 30 2004, 01:18 PM
Post #3





Group: Members
Posts: 38
Joined: 18-October 04
Member No.: 5,080



So I did some poking on my own and found a couple things:
First, the new pdaXrom (rc5) gives you the ability to expand the root partition to is optimum size under the flash options in the installer. Whoo hoo! 121Mb root. This subject was also discussed in http://www.oesf.org/forums/inde...361&hl=ashley_s
Thanks, Ashley, you rock!
Moving the home partition to a flash card is easy, simply edit the /etc/fstab. There is the small problem of fixing /etc/sdcontrol to prevent it from also being mounted by the flash automounter. I encountered other problems, though, that prevented me from simply doing this. What I really wanted was a partitioned sd card, half for /home, half for transfering files and flashing the rom. To be most cross platform compatable, I wanted my transfer partition to be fat while my home directory to be ext2. If I mounted both partitions at the same time, well.... I just couldn't. If listed in the fstab and one partition was already mounted, the mount program would complain that the device file did not exist. If mounted from the command line, one filesystem would be unreadable/writable. Either way, I received many errors in dmesg:
devfs_register(part1): could not append to parent, err: -17
As for remapping /home/tmp/ipkg to /var/ipkg, this is easily done in /etc/ipkg.conf.
Bottom line, I got my greater root space; it was an easy reinstall. I still don't know how to mount two partitions from the same card at the same time, though. M'be that is a different thread.
Go to the top of the page
 
+Quote Post
rgrep
post Oct 30 2004, 04:14 PM
Post #4





Group: Members
Posts: 149
Joined: 19-July 03
From: New Zealand
Member No.: 268



QUOTE(sonicbuddha @ Oct 31 2004, 09:18 AM)
So I did some poking on my own and found a couple things:
First, the new pdaXrom (rc5) gives you the ability to  expand the root partition to is optimum size under the flash options in the installer.  Whoo hoo! 121Mb root.  This subject was also discussed in  http://www.oesf.org/forums/inde...361&hl=ashley_s
Thanks, Ashley, you rock!
Moving the home partition to a flash card is easy, simply edit the /etc/fstab.  There is the small problem of fixing /etc/sdcontrol to prevent it from also being mounted by the flash automounter.  I encountered other problems, though, that prevented me from simply doing this.  What I really wanted was a partitioned sd card, half for /home, half for transfering files and flashing the rom.  To be most cross platform compatable, I wanted my transfer partition to be fat while my home directory to be ext2.  If I mounted both partitions at the same time, well.... I just couldn't.  If listed in the fstab and one partition was already mounted, the mount program would complain that the device file did not exist.  If mounted from the command line, one filesystem would be unreadable/writable.  Either way, I received many errors in dmesg:
devfs_register(part1): could not append to parent, err: -17
As for remapping /home/tmp/ipkg to /var/ipkg, this is easily done in /etc/ipkg.conf.
Bottom line, I got my greater root space; it was an easy reinstall.  I still don't know how to mount two partitions from the same card at the same time, though.  M'be that is a different thread.

Good work for figuring out how to increase your root partition! biggrin.gif

Don't worry about those "could not append to parent" errors, they are quite normal with devfs. There shouldn't be anything stopping you mounting multiple partitions of your SD card at once - it works fine for me.

I have partitioned my 512MB SD card into the following scheme:
  • /dev/mmcd/disc0/part1
    • 135.2 MB FAT32 (for flashing, NAND backups and transferring to/from Windows
    • mounted manually when I need it on /mnt/fat
  • /dev/mmcd/disc0/part2
    • 341.8 MB ext3 (for normal use)
    • mounted automatically on /mnt/card
To get this to work I just edited /etc/sdcontrol and changed the DEVICE variable (on line 11) to use part2 instead of part1. I then edited /etc/fstab to mount part1 on /mnt/fat.
I could modify /etc/sdcontrol to mount both partitions automatically but haven't bothered since I don't need this behaviour. /etc/sdcontrol actually ignores /etc/fstab so a good fix would be to have it mount all SD card entries found in /etc/fstab. Let me know if you would like this and I'll put out a modified version.

Matt
Go to the top of the page
 
+Quote Post
sonicbuddha
post Nov 2 2004, 11:43 PM
Post #5





Group: Members
Posts: 38
Joined: 18-October 04
Member No.: 5,080



Thanks, Matt. I actually saw your post in the partitioning sd thread saying about the same. I haven't edited my sdcontrol file as it is doing pretty much exactly what I wanted, which is mounting the first partition, vfat, automatically. Although on greater thought that it seems pretty redundant since, with my home directory (hopefully) mapped to the sd card on partition 2, I won't be removing it much!
I continue to have problems getting the second partition, the ext2 partition, to mount at boot. It is listed in the fstab and when I execute a mount -a, it mounts fine. When I reboot, it won't mount at all and without any really clear errors other than "Unrecognized mount option quiet" which is confusing and may be unrelated since I listed the mount option as "defaults" and quiet is not one of them. Its hardly an error I would expect to prevent it from mounting. For a bit I suspected it might be a conflict with the kernel paramenter which attempts to define the home partition on internal flash (something I plan to hack as soon as I have time to geek it: http://www.oesf.org/forums/inde...parameter&st=0) until I moved my home directory to a new mountpoint /users. I am befuddled. I am begining to suspect that the consulting of fstab may come before the starting of the starting of the SD card manager or at least the initialization of the sd device files, whereas listing everything in sdcontrol would resolve this if it can handle more than one device (partition) at a time. Yet I am not seeing any "device file does not exist" errors in dmesg. ugh. M'be in the morning.....
On the note of internal flash and some of the configuration changes I considered, I understand why moving the tmp space of ipkg into the home partition would be desirable. Tmp space is high traffic and can wear flash; best to keep the / partition low write and longer life. All the more reason for to move home directory space off of internal flash!
Go to the top of the page
 
+Quote Post
sonicbuddha
post Nov 13 2004, 08:23 PM
Post #6





Group: Members
Posts: 38
Joined: 18-October 04
Member No.: 5,080



I don't know if anyone followed this thread, but I have worked out a way to resolve all the issues I was looking for improvement on. I would have worked it out earlier, but work, life.... Now I have a cold so I had time to geek:
I worked out a means of moving the entire home partition to the sd card, still have a partition available on it to share via usb, and have them all mount at boot and yet not prevent my ability to remove the card and use the sd slot for simply storage.
The primary problem was that the sd devices were not initialized until late in the boot sequence, after the partitions listed in fstab were already mounted.
Mounting and unmounting of the sd devices is controled by the commands in /etc/sdcontrol. By rewriting sdcontrol I now have my first sd partition mounted on /mnt/card and my second on /home. If there is no second partition, it does not try to mount it. Since I found the original a bit, um, rough, I completely rewrote it. Feel free to use it yourself, but at your own risk.
A couple notes:
1) Copy the contents of your /home partition/directory to the second partition of the sd card BEFORE using this script or you will be lost without any files. For lack of rsync, I would use gnu-tar, being careful to preserve permissions with the -p flag. I am not going to outline how to partition your sd card or create file systems. There are enough threads about that.
2) I would leave a basic home partition on the internal flash, even if you never expect to use it. This is a good means of c.y.a. just in case your sd fails and you still want to log in.
3) Once you have inserted (or rebooted) with the sd card with the second partition that contains your home dir, you will not be able to unmount it unless you reboot. The reasons should be obvious: this is your home dir. It will be hard to create a situation where the files there are not active in one form or another. It refuses to unmount with good reason.
4) You can insert the sd card with the home partition while logged in and it will mount over the existing home partition/directory. It may break a few things, hopefully all resolvable by cd-ing to / and back, but so do it at your own risk. See above for why.
5) Once you are logged in on your sd card and you want to remove it, simply reboot, remove the card during the reboot process, and insert a different sd card with only one partition. If you did 2, then you are fine, with the sd card now mounted only under /mnt/card/

Blah blah blah, here is the new /etc/sdcontrol script. Its pretty simple, once you read it, so have fun hacking it to your own purposes. Always back up, of course! Please note there are plenty of easy to understand variables that you can change.
Attached File(s)
Attached File  sdcontrol.tar.gz ( 904bytes ) Number of downloads: 42
 
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 17th December 2014 - 04:42 PM