Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: winglee on August 21, 2010, 02:09:01 AM

Title: Hard Disk Format Prolbem
Post by: winglee on August 21, 2010, 02:09:01 AM
Dear Sir,

When I install TinyCore 3.0, I face Hard Disk Format Problem.

When I type cfdisk /dev/hda, a error message was showed.

"FATAL ERROR :Bad Primary Partition 1 Partition ends in the final partial cylinder."

Please teach me how to solve.

Thanks.
Title: Re: Hard Disk Format Prolbem
Post by: TaoTePuh on August 21, 2010, 03:15:47 AM
I have read that this is a special problem of cfdisk. Have you ever tried a different partition editor, e.g. fdisk or GParted?
Title: Re: Hard Disk Format Prolbem
Post by: curaga on August 21, 2010, 03:52:55 AM
Existing partition(s) are invalid; start with "cfdisk -z" to have a clean slate.
Title: Re: Hard Disk Format Prolbem
Post by: beerstein on August 21, 2010, 05:16:06 AM
Hi: For partitioning purpuses I always use Gparted or PartitionMagic.
You my use a live CD and start Gparted from that liveCD.
The GUI allows you to play around and see what is working

regards
beerstein
Title: Re: Hard Disk Format Prolbem
Post by: tinypoodle on August 21, 2010, 05:38:34 AM
I met the same recently on a disk which had not been user partitioned (a single NTFS partition).
fdisk and sfdisk did not have such an issue with the disk.
After shrinking the existing partition (losslessly) and creating 3 new partitions with gparted, the cfdisk issue had gone away. gparted initially showed unallocated space of 1 MB at start of disk which disappeared after partitioning.
Speculating that doing a most minor modification with gparted just to cause it to rewrite the partition table might do the job.
If you do not wish to repartition, testdisk might possibly help (I haven't tried).
Title: Re: Hard Disk Format Prolbem
Post by: winglee on August 21, 2010, 06:53:52 AM
Dear Sir,

Thanks for all people helping.

The harddisk was installed peppermint ice before.

Is there any help for solving the problem?

Thanks.
Title: Re: Hard Disk Format Prolbem
Post by: tinypoodle on August 21, 2010, 07:03:36 AM
Do you want to retain anything on that disk or just wipe it all and start anew?

What exactly of all approaches in replies is not clear to you? Ask more specifically?
Title: Re: Hard Disk Format Prolbem
Post by: winglee on August 21, 2010, 07:06:24 AM
Dear Sir,

i want to erase all informations in Hard Disk and start a new.

Thanks.
Title: Re: Hard Disk Format Prolbem
Post by: tinypoodle on August 21, 2010, 07:11:42 AM
What I would recommend then even in general would be to zero it out first, that can't harm.
Not sure if that will fix the issue with cfdisk or not, you just have to see; if not, you can then still follow curaga's approach.

Code: [Select]
sudo cat /dev/zero > /dev/XdX

where XdX is the device of disk, e.g. hda, sda; make sure you get that right.
Title: Re: Hard Disk Format Prolbem
Post by: maro on August 21, 2010, 08:33:16 AM
Hmm, I'm not quite sure that posting a possibly quite "dangerous" command as in reply #8 is such a good idea. As far as i can tell it would lead to the "destruction" of all hard disk partitions (and not just the one targeted one).

I just hope that it's not meant to be "practical joke" like the one a co-worker of mine ones tried by suggesting to a new sysadmin to "solve" a problem with sudo rm -rf /
Title: Re: Hard Disk Format Prolbem
Post by: tinypoodle on August 21, 2010, 08:35:26 AM
Agreed -and I guess same is valid for reply #2, but OP was explicitely asked and explicitely replied wanting to wipe all data from disk.  :-[
Title: Re: Hard Disk Format Prolbem
Post by: maro on August 21, 2010, 08:38:00 AM
Yeah, but there is a difference between "all partitions of one disk" and "all partitions of all disks". And I'm afraid your command does the latter.
Title: Re: Hard Disk Format Prolbem
Post by: tinypoodle on August 21, 2010, 08:42:25 AM
where *d* is the device of disk, e.g. hda, sda; make sure you get that right.
If there is any convincing proposal to formulate that better, I am ready to modify post  ;)
Title: Re: Hard Disk Format Prolbem
Post by: tinypoodle on August 21, 2010, 08:44:10 AM
edited. any better now?

Difference in consequences in case of a thoughtless copy and paste.

And for the case of wanting only to zero out one partition:
Code: [Select]
sudo cat /dev/zero > /dev/XdXN

e.g. for XdXN = hda3
Title: Re: Hard Disk Format Prolbem
Post by: maro on August 21, 2010, 09:03:46 AM
Thanks for making that change. Please don't get me wrong it's just too easy to copy & paste commands and some people might not be aware of the consequences.
Title: Re: Hard Disk Format Prolbem
Post by: tinypoodle on August 21, 2010, 09:11:39 AM
Point well taken, idiotsafe version couldn't harm much.

BTW, just a thought, there is a relation between 'sudo rm -rf /' and  'sudo cat /dev/zero > /dev/XdX'  :P

In case of any accidental deletion, having zeroed out partition earlier might reduce damage a lot by increasing chances of undelete.  ;) (I have even occasionally written a zero file to unused space of a partition, just to remove it after it wrote zeroes to all unused space)