[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: rebuilding my partition map



At 5:35 +0200 8/24/02, Grant Hollingworth wrote:
>I did a stupid thing...
You still can tell your self what happend, so it is not that stupid.

>
>Not knowing how to use hpmount (of hfsplus), I ran 'hpmount /dev/hda'. A
>while ago I had put myself in the disk group (can't remember why), so I
>had write permission to /dev/hda.
>
>/sbin/mac-fdisk -l /dev/hda now returns nothing.
>
>My system is still running, but I have the feeling that rebooting would
>be unpleasant.

It is wurth a try, but first read on.

>
>How can I reconstruct the partition map? df and /proc/partitions have
>some information:
>
>spooky$ df
>Filesystem           1K-blocks      Used Available Use% Mounted on
>/dev/hda11             1032088    144300    835360  15% /
>/dev/hda13             2064208   1593620    365732  82% /home
>/dev/hda14              495844    381031     89213  82% /var
>/dev/hda15             2064208   1814668    144684  93% /photo
>/dev/hda16             2064208   1739884    219468  89% /usr
>
>spooky$ cat /proc/partitions
>
>major minor  #blocks  name     rio rmerge rsect ruse wio wmerge wsect wuse
>running use aveq
>
>   3     0   19535040 hda 182128 300566 2458956 3295240 155294 861994
>3732712 28351960 -44 41433290 -1322175690
>   3     1         31 hda1 0 0 0 0 0 0 0 0 0 0 0
>   3     2         27 hda2 0 0 0 0 0 0 0 0 0 0 0
>   3     3         37 hda3 0 0 0 0 0 0 0 0 0 0 0
>   3     4         27 hda4 0 0 0 0 0 0 0 0 0 0 0
>   3     5         37 hda5 0 0 0 0 0 0 0 0 0 0 0
>   3     6        100 hda6 0 0 0 0 0 0 0 0 0 0 0
>   3     7        256 hda7 0 0 0 0 0 0 0 0 0 0 0
>   3     8        256 hda8 0 0 0 0 0 0 0 0 0 0 0
>   3     9    9767129 hda9 0 0 0 0 0 0 0 0 0 0 0
>   3    10        800 hda10 0 0 0 0 0 0 0 0 0 0 0
>   3    11    1048576 hda11 10109 9980 160706 189570 18445 35267 431448
>3512910 0 980160 3706220
>   3    12     131072 hda12 11471 28094 316520 347430 7830 36837 363328
>1055590 0 279710 1407130
>   3    13    2097152 hda13 13894 22890 169914 177570 15475 52787 438734
>2510310 0 580990 2691650
>   3    14     512000 hda14 63488 131747 390484 1235170 74392 625891
>1401758 11905470 0 1543830 13163750
>   3    15    2097152 hda15 3204 24259 174146 106320 815 7852 23580 155470
>0 87230 269320
>   3    16    2097152 hda16 79851 82695 1245162 1237600 38336 103360
>1073862 9212200 0 1753670 10464410
>   3    17    1783235 hda17 0 0 0 0 0 0 0 0 0 0 0
>
>
>hda12 is swap. hda17 is free space. hda10 is my boot partition. hda9 is
>an hfs plus partition. The first eight partitions are the weird Mac OS
>ones.
>
>With the info I have now, it seems like I can (maybe) rescue my Linux setup. I
>would like to repair the Mac OS partitions, too, but I don't have
>anything important on them.
>
>Any ideas?

Backup the system while you still can.
Perhaps that dd(1), data duplicator, your friend for the Mac partitions is.

I'm not sure if you get more information about the partition table.

This the info on my system:
stappers@bahrain:~
$ /sbin/mac-fdisk -l
/dev/hda
        #                    type name                 length   base     (
size)  system
dump: name /dev/hda len 8
/dev/hda1     Apple_partition_map Apple                    63 @ 1        (
31.5k)  Partition map
/dev/hda2         Apple_Bootstrap bootstrap              1600 @ 64
(800.0k)  NewWorld bootblock
/dev/hda3         Apple_UNIX_SVR2 boot                  63936 @ 1664     (
31.2M)  Linux native
/dev/hda4         Apple_UNIX_SVR2 home                 262144 @ 65600
(128.0M)  Linux native
/dev/hda5         Apple_UNIX_SVR2 swap                1048576 @ 327744
(512.0M)  Linux swap
/dev/hda6         Apple_UNIX_SVR2 root               28121792 @ 1376320  (
13.4G)  Linux native

Block size=512, Number of Blocks=29498112
DeviceType=0x0, DeviceId=0x0

dfstappers@bahrain:~
$ df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/hda6             13840064   6465076   6671944  50% /
/dev/hda3                30953      9582     19773  33% /boot
/dev/hda4               126931     38332     82046  32% /home
stappers@bahrain:~
$ cat /proc/partitions
major minor  #blocks  name

   3     0   14749056 hda
   3     1         31 hda1
   3     2        800 hda2
   3     3      31968 hda3
   3     4     131072 hda4
   3     5     524288 hda5
   3     6   14060896 hda6
   3    64     273490 hdb
stappers@bahrain:~
$


You can use it to recalculate to reassemble your partition.


I assume that you have a rescue disk (floppy/CD-ROM) or get one.
(Debian boot media are recues disks.)

Restart your computer to see if we are really in trouble.
If in trouble use the rescue disk and the gathered info to repair your system.


Good luck and I hope that you live to tell   ;-)


Geert St




Reply to: