Author Topic: C3100 Harddisk Repartitioning?  (Read 5057 times)

GadgetGuy

  • Sr. Member
  • ****
  • Posts: 321
    • View Profile
    • http://
C3100 Harddisk Repartitioning?
« on: October 30, 2005, 10:53:40 am »
I am trying to repartition my harddisk, to have two partitions:
- the first ( HDD3 ) - as VFAT, about 2 GB and
- the second ( HDD4 ?) - as EXT2 or EXT3

I do the following as root:

- umount /ext/hda3
- fdisk /ext/hda3

within fdisk:
-p    -> shows no partitions at all, so I start partitioning

- create new primary partition ( 'n' )
- from beginning to about sector 3700
- t "c" ( for VFAT)

- create new primary partition ( 'n' )
- from 3700 to the end

- p  -> check if two partitions show - they show as HDD3p1 and HDD3p2
- w  -> completes ok, no error message

I suppose this created now two partitions

now:
mkfs.vfat -F 32 /dev/hda3    -> ok

mke2fs -j /dev/hda4   -> I get an error message, saying something that the partition table has not been refreshed, and I should reboot.

After reboot I do
df -h
and get, that I have one /hda3 partition, filling the whole harddrive.

What am I doing wrong here? How can I have HDD3 and HDD4?

Should I have deleted HDD3 before repartitioning? How, when the partition does not show?

Thanks for any advice...
Zaurus C-3100 from PriceJapan with OZ 3.5.4.1. Opie and GPE
Ambicom CF WL1100C Wifi Card and Symbol Wireless Networker CF Wifi Card
1 GB Sandisk Ultra II SD
PdAir leather case - Nintendo DS metal case
various smaller CF and SD cards
all kinds of USB cables and accessories
-------------------------------------------------------------
Previous computers: TI 99/4A, ZX81, C64, Amiga 500, Apple Powerbook 100
Previous PDA's: Palm 1000, Palm III, Palm V, Palm Vx, Audiovox Maestro Pocket PC, Psion 5mx
Current PDA: Palm Tungsten E2
Current favourite: Zaurus C3100 - my "micro laptop"

bam

  • Hero Member
  • *****
  • Posts: 1213
    • View Profile
    • http://thegrinder.ws
C3100 Harddisk Repartitioning?
« Reply #1 on: October 30, 2005, 12:36:44 pm »
i didnt see a delete partition command in there anywhere, perhaps , just a thought. BTW this is a good idea. Personally I hate the whole idea of "haveing" to have a hdd1/2, this just sux. Would rather not have the backup on sd or cf card.
« Last Edit: October 30, 2005, 12:38:18 pm by bam »
SL-C3100 current: Stock/Tetsu 18h
Socket BT CF Card
Linksys WCF-12 802.11b/Cheapie USB Ethernet

The Grinder

gds

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • http://www.cs.tcd.ie/Glenn.Strong/
C3100 Harddisk Repartitioning?
« Reply #2 on: October 30, 2005, 12:45:46 pm »
Quote
I am trying to repartition my harddisk, to have two partitions:
- the first ( HDD3 ) - as VFAT, about 2 GB and
- the second ( HDD4 ?) - as EXT2 or EXT3

I do the following as root:

- umount /ext/hda3
- fdisk /ext/hda3
[div align=\"right\"][a href=\"index.php?act=findpost&pid=101349\"][{POST_SNAPBACK}][/a][/div]

The names you're using there look odd. On my 3100 device /dev/hda3 is mounted at /hdd3 -- I have no /ext directory.  Maybe that's a cacko thing, but the fdisk line is very fishy. fdisk should be given a device node to work on.

/dev/hda3 is the device name for the third partition on the first (IDE) device. You would normally run fdisk by pointing it at the whole disc (not just one partition):
Code: [Select]
fdisk /dev/hda
I wouldn't proceed if the fdisk banner didn't look right (a message about the cylinders on the disk being set to 7936, for instance), nor if "p" in fdisk didn't show the partitions I expected. On a stock 3100 there should be three partitions. The first two are very small (about 10Mb each) and contain disk images (I think the ROM can use these to recover a Z that would otherwise be bricked, so best leave them alone!). The third one contains all the user data.

Once "p" shows the three partitions you expect you could use "d" to delete the third one, and then "n" to add two new partitions, which would be /dev/hda3 and /dev/hda4.

You didn't ask this, but you might like to know that it's possible to resize /dev/hda3 dynamically (that is, without losing the files that are on it). I have done this to my own 3100 using GNU Parted (I had to compile it first -- drop me a line if you want the binary).
« Last Edit: October 30, 2005, 12:47:28 pm by gds »

DrWowe

  • Hero Member
  • *****
  • Posts: 696
    • View Profile
    • http://
C3100 Harddisk Repartitioning?
« Reply #3 on: October 30, 2005, 01:08:40 pm »
You could also try a less dangerous way.  Just create 2 large files, using dd, of the sizes you want, then format and mount them as loopback devices.

GadgetGuy

  • Sr. Member
  • ****
  • Posts: 321
    • View Profile
    • http://
C3100 Harddisk Repartitioning?
« Reply #4 on: October 30, 2005, 04:40:29 pm »
Thank you all for the quick and helpful answers.

First, I had a typo in my initial post. All references were to /dev/hda and not /ext/hda3: sorry!

Second: my problem has been  solved:

My mistake was to specify fdisk /dev/hda3 and not /dev/hda: thank you for pointing that out! All works now!

Thank you again!
Zaurus C-3100 from PriceJapan with OZ 3.5.4.1. Opie and GPE
Ambicom CF WL1100C Wifi Card and Symbol Wireless Networker CF Wifi Card
1 GB Sandisk Ultra II SD
PdAir leather case - Nintendo DS metal case
various smaller CF and SD cards
all kinds of USB cables and accessories
-------------------------------------------------------------
Previous computers: TI 99/4A, ZX81, C64, Amiga 500, Apple Powerbook 100
Previous PDA's: Palm 1000, Palm III, Palm V, Palm Vx, Audiovox Maestro Pocket PC, Psion 5mx
Current PDA: Palm Tungsten E2
Current favourite: Zaurus C3100 - my "micro laptop"

bam

  • Hero Member
  • *****
  • Posts: 1213
    • View Profile
    • http://thegrinder.ws
C3100 Harddisk Repartitioning?
« Reply #5 on: October 30, 2005, 04:56:09 pm »
now I am wondering during a factory reset does it erase hdd3 or does it return the hdd to "factory partitions"? i was thinking of a hdd3 backup on the device itself, so I can stop using my cf card.
or
wish I knew the scripts for doing the factory reset so I could disable the hdd3 erase.
SL-C3100 current: Stock/Tetsu 18h
Socket BT CF Card
Linksys WCF-12 802.11b/Cheapie USB Ethernet

The Grinder

GadgetGuy

  • Sr. Member
  • ****
  • Posts: 321
    • View Profile
    • http://
C3100 Harddisk Repartitioning?
« Reply #6 on: October 30, 2005, 05:11:01 pm »
Quote
now I am wondering during a factory reset does it erase hdd3 or does it return the hdd to "factory partitions"? i was thinking of a hdd3 backup on the device itself, so I can stop using my cf card.
or
wish I knew the scripts for doing the factory reset so I could disable the hdd3 erase.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=101393\"][{POST_SNAPBACK}][/a][/div]

As far as my personal experience is concerned, it does not return to factory partitions. If I am not mistaken, it just formats HDD3, and copies the default folders.

On a different note: a full factory reset is rarely needed. I have flashed several roms ( Cacko, pdaXrom etc.), and the HDD3 contents always stayed more or less the same ( the folders I have copied on HDD3 stayed the same, the system folders probably have changed ). I did a factory reset once, when my unit was still totally new and I messed up. Today I would be able to fix it without a factory reset...
Zaurus C-3100 from PriceJapan with OZ 3.5.4.1. Opie and GPE
Ambicom CF WL1100C Wifi Card and Symbol Wireless Networker CF Wifi Card
1 GB Sandisk Ultra II SD
PdAir leather case - Nintendo DS metal case
various smaller CF and SD cards
all kinds of USB cables and accessories
-------------------------------------------------------------
Previous computers: TI 99/4A, ZX81, C64, Amiga 500, Apple Powerbook 100
Previous PDA's: Palm 1000, Palm III, Palm V, Palm Vx, Audiovox Maestro Pocket PC, Psion 5mx
Current PDA: Palm Tungsten E2
Current favourite: Zaurus C3100 - my "micro laptop"

bam

  • Hero Member
  • *****
  • Posts: 1213
    • View Profile
    • http://thegrinder.ws
C3100 Harddisk Repartitioning?
« Reply #7 on: November 04, 2005, 04:58:29 am »
I am not quite there yet but I am getting there, one day at a time. Anyone got xfce to work with pocket debian?

whats your fstab look like, or did you just modify the rc.rofilesystem?
SL-C3100 current: Stock/Tetsu 18h
Socket BT CF Card
Linksys WCF-12 802.11b/Cheapie USB Ethernet

The Grinder

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
C3100 Harddisk Repartitioning?
« Reply #8 on: November 04, 2005, 05:21:57 am »
Quote
Quote
now I am wondering during a factory reset does it erase hdd3 or does it return the hdd to "factory partitions"? i was thinking of a hdd3 backup on the device itself, so I can stop using my cf card.
or
wish I knew the scripts for doing the factory reset so I could disable the hdd3 erase.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=101393\"][{POST_SNAPBACK}][/a][/div]

As far as my personal experience is concerned, it does not return to factory partitions. If I am not mistaken, it just formats HDD3, and copies the default folders.

On a different note: a full factory reset is rarely needed. I have flashed several roms ( Cacko, pdaXrom etc.), and the HDD3 contents always stayed more or less the same ( the folders I have copied on HDD3 stayed the same, the system folders probably have changed ). I did a factory reset once, when my unit was still totally new and I messed up. Today I would be able to fix it without a factory reset...
[div align=\"right\"][a href=\"index.php?act=findpost&pid=101394\"][{POST_SNAPBACK}][/a][/div]


actually, /root/etc/rc.d/rc.rofilesys is the culprit that reformats hdd2 and hdd3 during factory reset. make sure if you edit this file, you also untar /root/.home_default.tar and pop your fixed version into it and retar the file because during factory reset it also untars that file and will override your modified rc.rofilesys and possibly run the original version instead of your modified version
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

GadgetGuy

  • Sr. Member
  • ****
  • Posts: 321
    • View Profile
    • http://
C3100 Harddisk Repartitioning?
« Reply #9 on: November 04, 2005, 08:49:40 am »
Quote
whats your fstab look like, or did you just modify the rc.rofilesystem?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=102208\"][{POST_SNAPBACK}][/a][/div]


here is the entry I have added to fstab

Code: [Select]
/dev/hda4    /hdd4     ext3       default,noatime    0 1
For now I have to manually mount hdd4 after a reboot

Code: [Select]
su
mount -a

This does not work well for debian, since various debian files/folders are mounted during a boot ( at which time hdd4 is not present yet). So I will have to find to mount hdd4 during boot time.

I hope that meanie's new automounter script will make this automatic...
Zaurus C-3100 from PriceJapan with OZ 3.5.4.1. Opie and GPE
Ambicom CF WL1100C Wifi Card and Symbol Wireless Networker CF Wifi Card
1 GB Sandisk Ultra II SD
PdAir leather case - Nintendo DS metal case
various smaller CF and SD cards
all kinds of USB cables and accessories
-------------------------------------------------------------
Previous computers: TI 99/4A, ZX81, C64, Amiga 500, Apple Powerbook 100
Previous PDA's: Palm 1000, Palm III, Palm V, Palm Vx, Audiovox Maestro Pocket PC, Psion 5mx
Current PDA: Palm Tungsten E2
Current favourite: Zaurus C3100 - my "micro laptop"

bam

  • Hero Member
  • *****
  • Posts: 1213
    • View Profile
    • http://thegrinder.ws
C3100 Harddisk Repartitioning?
« Reply #10 on: November 04, 2005, 03:35:11 pm »
#mount -o remount, rw /
#cd /root/etc/rc.d
#cp -p rc.rofilesys rc.rofilesys.org

then edit rc.rofilesys with whatever you use for a text editor

I added this
Quote
mount -t $DEBIANFMT -o rw,noatime /dev/${IDE1}4 /hdd4
the rest is for error hadling just change hdd3 to hdd4 error message
to rc.rofilesys, below hdd3 entry

then created the mount point /hdd4

debugging, getting hdd4 error, how wierd...
« Last Edit: November 04, 2005, 03:41:09 pm by bam »
SL-C3100 current: Stock/Tetsu 18h
Socket BT CF Card
Linksys WCF-12 802.11b/Cheapie USB Ethernet

The Grinder

GadgetGuy

  • Sr. Member
  • ****
  • Posts: 321
    • View Profile
    • http://
C3100 Harddisk Repartitioning?
« Reply #11 on: November 04, 2005, 04:07:55 pm »
Quote
#mount -o remount, rw /
#cd /root/etc/rc.d
#cp -p rc.rofilesys rc.rofilesys.org

then edit rc.rofilesys with whatever you use for a text editor

I added this
Quote
mount -t $DEBIANFMT -o rw,noatime /dev/${IDE1}4 /hdd4
the rest is for error hadling just change hdd3 to hdd4 error message
to rc.rofilesys, below hdd3 entry

then created the mount point /hdd4

debugging, getting hdd4 error, how wierd...
[div align=\"right\"][a href=\"index.php?act=findpost&pid=102328\"][{POST_SNAPBACK}][/a][/div]

I will try the newest Automounter from meanie instead...
Zaurus C-3100 from PriceJapan with OZ 3.5.4.1. Opie and GPE
Ambicom CF WL1100C Wifi Card and Symbol Wireless Networker CF Wifi Card
1 GB Sandisk Ultra II SD
PdAir leather case - Nintendo DS metal case
various smaller CF and SD cards
all kinds of USB cables and accessories
-------------------------------------------------------------
Previous computers: TI 99/4A, ZX81, C64, Amiga 500, Apple Powerbook 100
Previous PDA's: Palm 1000, Palm III, Palm V, Palm Vx, Audiovox Maestro Pocket PC, Psion 5mx
Current PDA: Palm Tungsten E2
Current favourite: Zaurus C3100 - my "micro laptop"

bam

  • Hero Member
  • *****
  • Posts: 1213
    • View Profile
    • http://thegrinder.ws
C3100 Harddisk Repartitioning?
« Reply #12 on: November 04, 2005, 04:21:07 pm »
I will get this worked out, once I do I will post it  btw got a respawning error after diddleing too much
SL-C3100 current: Stock/Tetsu 18h
Socket BT CF Card
Linksys WCF-12 802.11b/Cheapie USB Ethernet

The Grinder

bam

  • Hero Member
  • *****
  • Posts: 1213
    • View Profile
    • http://thegrinder.ws
C3100 Harddisk Repartitioning?
« Reply #13 on: November 05, 2005, 01:00:51 am »
Ok, after alot of "diddleing" got it! Go Here and see what was done, works flawlessly. At least for the SL-C3100.

and yes, it mounts at boot. As for the erasing hdd3, I think its in the rc.rofilesys, pretty sure, gonna see what I can do to find a way to disable it
« Last Edit: November 05, 2005, 01:02:26 am by bam »
SL-C3100 current: Stock/Tetsu 18h
Socket BT CF Card
Linksys WCF-12 802.11b/Cheapie USB Ethernet

The Grinder

GadgetGuy

  • Sr. Member
  • ****
  • Posts: 321
    • View Profile
    • http://
C3100 Harddisk Repartitioning?
« Reply #14 on: November 05, 2005, 12:45:04 pm »
Quote
Ok, after alot of "diddleing" got it! Go Here and see what was done, works flawlessly. At least for the SL-C3100.

and yes, it mounts at boot. As for the erasing hdd3, I think its in the rc.rofilesys, pretty sure, gonna see what I can do to find a way to disable it
[div align=\"right\"][a href=\"index.php?act=findpost&pid=102393\"][{POST_SNAPBACK}][/a][/div]

Thank you.

Does this also work if you add/remove a CF card?
Zaurus C-3100 from PriceJapan with OZ 3.5.4.1. Opie and GPE
Ambicom CF WL1100C Wifi Card and Symbol Wireless Networker CF Wifi Card
1 GB Sandisk Ultra II SD
PdAir leather case - Nintendo DS metal case
various smaller CF and SD cards
all kinds of USB cables and accessories
-------------------------------------------------------------
Previous computers: TI 99/4A, ZX81, C64, Amiga 500, Apple Powerbook 100
Previous PDA's: Palm 1000, Palm III, Palm V, Palm Vx, Audiovox Maestro Pocket PC, Psion 5mx
Current PDA: Palm Tungsten E2
Current favourite: Zaurus C3100 - my "micro laptop"