# Fdisk 160 GB Hard drive

## gnac

Okay,  I went and bought a Western Digital 160Gb Ultra/133 hardrive on sale from circuit city in order to backup my partitions before screwing around with reiserfsck --rebuild-tree. (This message was originally posted here!)

However I am having some issues partitioning the drive.  I upgraded the bios on my Asus A7N8X Deluxe (probably not nesseccary) and I can see in the Bios that it recognizes all 160 GBs of the hardrive. (The Drive is connected to IDE-A as a slave with my current bootdrive)

However when I boot to the live CD (rc3 I believe) I can't partition any more than what appears to be the first 20 GB.  I tried using the first three partitions and then the extended, but whenever I try to create a partition greater than "20000M"  I get a "not enough blocks" error.  I don't recal having this problem with my 80G hardrives, although I did use something to create windows partitions on them.  I tried doing a 

```
dd if=/dev/hda of=/dev/hdb bs=8192
```

 which copied the contents and partition table of my 80GB successfully to my 160 GB, but I was unable to mount any of the partitions on the new drive.  I also tried creating a single partion on the new drive of max size and then 

```
dd if=/dev/hda8 of=/dev/hdb1
```

 with no luck.

Is there something special I have to use to partition a drive over 137GB?

----------

## jlg

where did you get that 137G limit from  :Idea: 

I just bought a 120G wd drive myself and had no problem at all making it into one big partition. Don't think it would have worked differently for a bigger drive :s

why are you doing it from the live cd? how about doing it from your installed gentoo?  

what program did you try to partition the drive with? fdisk? cfdisk? other? I used fdisk myself

----------

## BradN

In theory, linux should be able to support any size of a drive after the kernel has loaded.  You could maybe try booting a different kernel version in case there was a bug introduced in that particular version.  Maybe try one of the old live cd's or even a 1.2 install disc (just download the newer stage whatever image if you end up installing gentoo with it).

I've sucessfully used a 160GB drive in an old 386, so there should be no possible hardware limitation.Last edited by BradN on Wed Nov 05, 2003 5:10 pm; edited 1 time in total

----------

## ozonator

There's an explanation of this in the large disk howto.  The gist of it is that there are limitations in the older ATA standards, and consequently in ATA devices and drivers, that mean 128 GB or 137 GB (depending on how you calculate a GB) is the limit of what can be addressed on a drive.

Some more recent kernels have a patch that introduces 48-bit addressing, as also described in that howto.  With a kernel having that modification, you should have no trouble handling your 160 GB disk in Linux.  I don't know what kernel is on the -rc3 liveCD, but my guess is that it doesn't support 48 bit addressing.  Unfortunately, I don't know if the kernel on a newer CD would; maybe someone else here does....

----------

## gen2newB

do you have Long Block Addressing enabled in your BIOS? I dont see how that could affect anything, but it couldn't hurt.

----------

## gnac

jlg: I believe I got the 137 limit (128) from the linux harddisk howto described above by ozonator, or from someone else referencing it in these forums.

I'm tried to do it from the liveCD because my /home partiition is toast as mentioned in originally  referenced post.  To be honest, I booted into the live cd to safely reiserfsck the hda drive whithout worrying about stopping all my processes that use that drive.

Based on your comments and comments from ozonator and BradN I tried to do fdisk from my installation, and it is able to see all 160GBs.  I will try to fdisk the drive from my installation, and then return to the liveCD to do the dd copy and the reiserfsck.  If I still have troubles I'll download the latest liveCD and try it from there.  I'll let you know what happens.

----------

## BradN

If you have problems fdisking beyond 20GB, I would be very worried about whether dd will work too.  I think it would be best to find a livecd that can manage to fdisk the drive properly before you use it to copy over the data.  

You could also do it from your hard drive installation if you don't want to mess with more cd's yet - all you have to do is unmount all partitions except / and then remount the root partition read only.  You'd need to stop all of the services that could be writing to the drive - metalog or any other system logger comes to mind.  Going to single user mode should accomplish this I think.

```
init 1

mount -o remount,ro /dev/rootpartition /
```

If it remounts as read only, you should be good to go as far as copying data from it goes.

----------

## gnac

Okay, 

using my install I was able to fdisk the drive and then dd the contents of the corrupt partition to the new drive using the liveCD.

However 

```
reiserfsck --rebuild-tree
```

 did not recover any of the corrupted folders it just removed any reference to them.  NOT GOOD.

In this post https://forums.gentoo.org/viewtopic.php?p=632375#632375 I ask if there are ways to recover the data, and also what fs should I use in the future to avoid this mess in the first place.

Thanks for your help.

----------

## jlg

yah! reiserfs is a real bitch!!!   I'm sticking to ext3 it may not have all the hype of being as fast ect.. but its rock solid!  anyway who cares about the minimal speed difference when you have a hardware raid 0 with 3 x 10k rpm scsi drives    :Razz: 

----------

