Help - Search - Members - Calendar
Full Version: C3100 Harddisk Repartitioning?
OESF Forums > Distros, Development, and Model Specific Forums > Model Specific Forums > C1000/3x00 General discussions
GadgetGuy
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...
bam
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.
gds
QUOTE(GadgetGuy @ Oct 30 2005, 03:53 PM)
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
*


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
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).
DrWowe
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
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!
bam
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.
GadgetGuy
QUOTE(bam @ Oct 30 2005, 04:56 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.
*


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...
bam
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?
Meanie
QUOTE(GadgetGuy @ Oct 31 2005, 08:11 AM)
QUOTE(bam @ Oct 30 2005, 04:56 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.
*


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...
*




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 smile.gif
GadgetGuy
QUOTE(bam @ Nov 4 2005, 04:58 AM)
whats your fstab look like, or did you just modify the rc.rofilesystem?
*



here is the entry I have added to fstab

CODE
/dev/hda4    /hdd4     ext3       default,noatime    0 1


For now I have to manually mount hdd4 after a reboot

CODE
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...
bam
#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...
GadgetGuy
QUOTE(bam @ Nov 4 2005, 03:35 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...
*



I will try the newest Automounter from meanie instead...
bam
I will get this worked out, once I do I will post it smile.gif btw got a respawning error after diddleing too much
bam
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 smile.gif
GadgetGuy
QUOTE(bam @ Nov 5 2005, 01:00 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 smile.gif
*


Thank you.

Does this also work if you add/remove a CF card?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.