Linux Debian support - Partitioning hard disk

This is Interesting: Free IT Magazines  
Home > Archive > Linux Debian support > July 2006 > Partitioning hard disk





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Partitioning hard disk
Salve Håkedal

2006-07-21, 7:12 pm

I tried to install xubuntu on a PentiumII with 192mb memory.
That didn't work (for me), and I ended up with a hardisk (hdb),
that gives me messages like these:

# cfdisk /dev/hdb
FATAL ERROR: Bad primary partition 3:
partition begins after end-of-disk

or
# gpart /dev/hdb hangs after listing some partitions

or
(parted) print
Error: Can't have a partition outside the disk!


I don't mind loosing the data, but I need to use the disk.
What tools are able to get it working again?


I'm running Sarge all right on hda.
Linux 2.4.27-2-686
The bad disk is 40 Gig.
Bill Marcum

2006-07-22, 1:12 am

On Fri, 21 Jul 2006 16:24:09 -0500, Salve Håkedal
<ikkjespam.salve@fiolinmaker.no> wrote:
> I tried to install xubuntu on a PentiumII with 192mb memory.
> That didn't work (for me), and I ended up with a hardisk (hdb),
> that gives me messages like these:
>
> # cfdisk /dev/hdb
> FATAL ERROR: Bad primary partition 3:
> partition begins after end-of-disk
>
> or
> # gpart /dev/hdb hangs after listing some partitions
>
> or
> (parted) print
> Error: Can't have a partition outside the disk!
>
>
> I don't mind loosing the data, but I need to use the disk.
> What tools are able to get it working again?
>
>

Have you tried fdisk? Post the output of "fdisk -l /dev/hdb" if it
doesn't crash. Also post the output of "dmesg | grep hdb".

> I'm running Sarge all right on hda.
> Linux 2.4.27-2-686
> The bad disk is 40 Gig.



--
Appendix:
A portion of a book, for which nobody yet has discovered any use.
Salve Håkedal

2006-07-22, 1:12 am

On 2006-07-22, Bill Marcum <bmarcum@iglou.com> wrote:
> On Fri, 21 Jul 2006 16:24:09 -0500, Salve Håkedal
> <ikkjespam.salve@fiolinmaker.no> wrote:
> Have you tried fdisk? Post the output of "fdisk -l /dev/hdb" if it
> doesn't crash. Also post the output of "dmesg | grep hdb".
>

Here it is:
root@gamla:/home/vaktm# fdisk -l /dev/hdb

Disk /dev/hdb: 33.8 GB, 33820286976 bytes
16 heads, 63 sectors/track, 65531 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 1 29066 14649232+ 83 Linux
/dev/hdb2 29067 49046 10069889 5 Extended
/dev/hdb3 49047 65531 8308440 a5 FreeBSD
/dev/hdb4 * 65536 77042 5799465 83 Linux
Partition 4 does not end on cylinder boundary.
/dev/hdb5 29067 29649 293800+ 82 Linux swap / Solaris
/dev/hdb6 29650 34517 2453125 83 Linux
/dev/hdb7 41295 49046 3906976+ 83 Linux


root@gamla:/home/vaktm# dmesg | grep hdb
ide0: BM-DMA at 0xe000-0xe007, BIOS settings: hda:pio, hdb:pio
hdb: SAMSUNG SV4012H, ATA DISK drive
hdb: attached ide-disk driver.
hdb: Host Protected Area detected.
hdb: 66055248 sectors (33820 MB) w/2048KiB Cache, CHS=65531/16/63, UDMA(33)

>
>

s. keeling

2006-07-22, 1:12 pm

Salve Håkedal <ikkjespam.salve@fiolinmaker.no>:
> On 2006-07-22, Bill Marcum <bmarcum@iglou.com> wrote:
>
> root@gamla:/home/vaktm# fdisk -l /dev/hdb
>
> Disk /dev/hdb: 33.8 GB, 33820286976 bytes
> 16 heads, 63 sectors/track, 65531 cylinders
> Units = cylinders of 1008 * 512 = 516096 bytes
>
> Device Boot Start End Blocks Id System
> /dev/hdb1 1 29066 14649232+ 83 Linux
> /dev/hdb2 29067 49046 10069889 5 Extended
> /dev/hdb3 49047 65531 8308440 a5 FreeBSD
> /dev/hdb4 * 65536 77042 5799465 83 Linux
> Partition 4 does not end on cylinder boundary.
> /dev/hdb5 29067 29649 293800+ 82 Linux swap / Solaris
> /dev/hdb6 29650 34517 2453125 83 Linux
> /dev/hdb7 41295 49046 3906976+ 83 Linux


Not good. How did you manage to get seven primary partitions (at
least that's how it looks to me)? You can have one of these two:

- Four "primary" partitions.

- Three primary and one "extended", the extended containing any
number of "logical" partitions.

I'd use fdisk to:

- Blow away ptns 7 through 4 (it might be wise to reboot here).

- Create an extended ptn.

- Recreate those ptns as logical ptns within the extended ptn.

fdisk will almost automatically do this for you after you choose
"extended" instead of "primary" for the ptn type of ptn 4. Throw all
the remaining space into the new extended ptn 4. Now you'll be able
to recreate your old 4 through 7 as logicals within the extended ptn.


--
Any technology distinguishable from magic is insufficiently advanced.
(*) http://www.spots.ab.ca/~keeling Linux Counter #80292
- - http://www.faqs.org/rfcs/rfc1855.html
Spammers! http://www.spots.ab.ca/~keeling/emails.html
ray

2006-07-22, 1:12 pm

On Sat, 22 Jul 2006 14:32:13 +0000, s. keeling wrote:

> Salve HÃ¥kedal <ikkjespam.salve@fiolinmaker.no>:
>
> Not good. How did you manage to get seven primary partitions (at
> least that's how it looks to me)? You can have one of these two:
>
> - Four "primary" partitions.
>
> - Three primary and one "extended", the extended containing any
> number of "logical" partitions.
>


Looks to me like 5,6,7 are logical partitions within 2 - which would be
the extended while 1,3,4 are primary.


> I'd use fdisk to:
>
> - Blow away ptns 7 through 4 (it might be wise to reboot here).
>
> - Create an extended ptn.
>
> - Recreate those ptns as logical ptns within the extended ptn.
>
> fdisk will almost automatically do this for you after you choose
> "extended" instead of "primary" for the ptn type of ptn 4. Throw all
> the remaining space into the new extended ptn 4. Now you'll be able
> to recreate your old 4 through 7 as logicals within the extended ptn.


Salve Håkedal

2006-07-22, 1:12 pm

On 2006-07-22, ray <ray@zianet.com> wrote:
> On Sat, 22 Jul 2006 14:32:13 +0000, s. keeling wrote:
>
>
> Looks to me like 5,6,7 are logical partitions within 2 - which would be
> the extended while 1,3,4 are primary.
>
>
>

I just made fdisk delete all partitions except the first one, as all the
others was different OSs that I had tested, but never used. But the
first one was backup of hda.
Which one was the extended, I don't remember.
I'm happy that fdisk could help me. I didn't expect that, as I thought
that cfdisk was a better alternative to fdisk.

Many thanks to Bill Marcum
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com