Results 1 to 6 of 6

Thread: Partition Info Stored in a Log File?

  1. #1

    Default Partition Info Stored in a Log File?

    Had some fun, having repartitioned a disk yesterday but uwisely not obliterating a DOS OEM partition, came down to find the machine had woken up & booted the wrong disk (one I partitioned but without ne OS); with apparently dead (unwilling to seek main drive).

    Trouble is the OEM diagnostics was old DOS and likes to **** on other disk partition tables and it seems to have got run, from what was the OEM Windows disk. Now I've fixed that, it seems to be screwed partition table issue.

    No problem, it happened before and I recovered with gpart(8) & a spot of tweaking, but due to "redevelopment" I've now got my partition table backups on the disk that's lost. The old backup of them, got tidied. gpart's for once only finding the partitions I don't care about eg) swap & a Windows 7 NTFS backup partition.

    Have some logfiles from 11.1 days, which may if it gets recorded somewhere by YaST or other in /var/log actually have the table output. Any one happen to know, where to look as a time saver?

    I'd like to get these system partitions back, as I put in bugs on 12.1 M2, as well as an 11.4 and older 11.2 install for comparison. Wasn't planning on re-installing, when I get asked to try something later on.

  2. #2
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    22,858

    Default Re: Partition Info Stored in a Log File?

    On 2011-07-01 14:36, robopensuse wrote:

    > Have some logfiles from 11.1 days, which may if it gets recorded
    > somewhere by YaST or other in /var/log actually have the table output.
    > Any one happen to know, where to look as a time saver?


    Perhaps /var/log/YaST2, Some XML files like disk_sda.info

    If not, there might be something more under /var/whatever/yast

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)

  3. #3

    Default Re: Partition Info Stored in a Log File?

    log/YaST2/disk_sda :
    evice: /dev/sda
    Major: 8
    Minor: 0
    Range: 16
    Cylinder: 30394
    Head: 255
    Sector: 63
    Label: msdos
    MaxPrimary: 4
    ExtPossible: 1
    MaxLogical: 15
    SizeK: 244140625
    Partition: 1 /dev/sda1 401625 8 1 1 50 83 primary boot
    Partition: 2 /dev/sda2 39760875 8 2 51 4950 83 primary
    Partition: 3 /dev/sda3 40162500 8 3 5001 5000 83 primary
    Partition: 4 /dev/sda4 163806772 8 4 10001 20393 f extended

    Looks very plausible
    I would prefer exact sector info, for input into sfdisk by hacking a partition dump file, but that certainly looks right and ought to be enough. I know the first partition started at sector 63, and the label was correctly found.

  4. #4

    Default Re: Partition Info Stored in a Log File?

    Think the software did something which messed with Linux's idea of the disk geometry. Am rescanning with that fixed so it's got more chance of finding partitions which should be starting on cylinder boundaries.

  5. #5

    Default Re: Partition Info Stored in a Log File?

    This was fun, not had to do this for quite a while
    Got the table back but unfortunately no cigar All the superblock stuff is trashed. Least I had some practice with the calculator and old fashioned way, rather than all this GUI partioning one does these days. With the way they work, you definitely need to use sfdisk -d or it'd drive you barmy with all the irregular cylinder numbers and/or sector sizes due to the rounding.

    fir:~/parts # sfdisk -l /dev/sda

    Disk /dev/sda: 30394 cylinders, 255 heads, 63 sectors/track
    Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

    Device Boot Start End #cyls #blocks Id System
    /dev/sda1 * 0+ 49 50- 401624+ 83 Linux
    /dev/sda2 50 4999 4950 39760875 83 Linux
    /dev/sda3 5000 9999 5000 40162500 7 HPFS/NTFS/exFAT
    /dev/sda4 10000 30392 20393 163806772+ 5 Extended
    /dev/sda5 10000+ 14999 5000- 40162499+ 7 HPFS/NTFS/exFAT
    /dev/sda6 15000+ 15499 500- 4016249+ 82 Linux swap / Solaris
    /dev/sda7 15500+ 15699 200- 1606499+ 83 Linux
    /dev/sda8 15700+ 15999 300- 2409749+ 83 Linux
    /dev/sda9 16000+ 16999 1000- 8032499+ 83 Linux
    /dev/sda10 17000+ 17999 1000- 8032499+ 83 Linux
    /dev/sda11 18000+ 18999 1000- 8032499+ 83 Linux

    I do have a byte copy of the disk, if something else occurs to me, for now I'm testing the drive and planning to give up..

  6. #6
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    22,858

    Default Re: Partition Info Stored in a Log File?

    On 2011-07-01 20:36, robopensuse wrote:

    > I do have a byte copy of the disk, if something else occurs to me, for
    > now I'm testing the drive and planning to give up..


    Bad luck...

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •