Results 1 to 4 of 4

Thread: using knoppix 5.1.1 to do system restore

  1. #1
    Junior Member
    Join Date
    Feb 2007
    Posts
    1

    using knoppix 5.1.1 to do system restore

    Hello,

    I have heard that you can do a system restore using knoppix. Is it possible to do this with knoppix 5.1.1? If so, how would you go about it? A friend has knoppix & said it was hack 55?

    Thanks--
    elohnah

  2. #2
    Member registered user
    Join Date
    Jul 2006
    Location
    toronto, canada
    Posts
    87
    Your friend wasn't too clear. S/he should have mentioned that this refers to an O'Reilly book, Knoppix Hacks, a collection of hacks or fixes to knoppix.

    #55 is using gpart to find lost partitions. I assume that's what they thought the problem was. If they are readily on hand, they should be the one to help you on this. In any case, I advise you to go out and find a copy of Knoppix Hacks.

    I have not been in this situation yet (knock on wood!), so I can't really advise you any more on this.

    Good luck!

  3. #3
    Member registered user
    Join Date
    Oct 2006
    Location
    Delft-The netherlands
    Posts
    33

    I have the ebook

    HI I have the ebook here and this is hack 55:

    Hack 55 Find Lost Partitions


    If you have ever made a typo when deleting or restoring the MBR, you probably also have trashed your partition table. Use gpart, included on the Knoppix disc, to restore lost partition tables.

    OK, so you had a little too much fun with the previous hack, ignored the warnings, accidentally typed 512 when you should have typed 446, and now your partition table is gone. Or maybe you accidentally ran fdisk on the wrong drive. No problem. Just restore from the backup you made before you started. You did back up your MBR, right? Don't worry; it happens to the best of us. The last time I trashed my partition table, I was trying to update grub on my laptop using dd. Like an idiot, I followed the instructions to create a grub boot floppy and applied them to install grub on my laptop's hard drive. Overwriting the first 512 bytes of a floppy with the grub boot sector is fine; overwriting the first 512 bytes of my hard drive is not. I was unable to boot and had no partition table. For many people, this might have been the time to reinstall, but I knew the files and partitions were there—I just couldn't get to them. If only I had a tool to figure out where the partitions began and ended, I could then recreate my partition table and everything would be back to normal.

    Lucky for me, there is such a tool: gpart (short for "guess partition"). Gpart scans a hard drive for signs of a partition's start by comparing a list of filesystem-recognition modules it has with the sectors it is scanning, and then creates a partition table based on these guesses. Doubly lucky for me, gpart comes included with Knoppix, so I was able to restore my laptop's MBR without having to take apart the laptop and hook the drive to a desktop machine. I ran gpart, checked over its guesses, which matched my drive, and voila! My partitions were back.

    Gpart is an incredibly useful tool, and I am grateful for it; however, it does have its limitations. Gpart works best when you are restoring a partition table of primary partitions. In the case of extended partitions, gpart tries its best to recover the partition information, but there is less of a chance of recovery.

    To recover your partition table, run gpart, and then tell it to scan your drive:

    knoppix@ttyp0[knoppix]$ sudo gpart /dev/hda


    By default, gpart only scans the drive and outputs results; it does not actually write to the drive or overwrite your MBR. This is important because gpart may not correctly guess all of your partitions, so you should check its guesses before you actually write them to disk.

    Gpart scans through the hard drive and outputs possible partition tables as it finds them. When it is finished scanning the drive, gpart outputs a complete list of partition tables it has found. Read through this list of partitions and make sure that it reflects the partitions you have created on the disk. It might be that gpart can recover only some of the partitions on the drive. Once you have reviewed the partitions that gpart has guessed, run gpart again but with the -W option to write the guessed partition table to the disk:

    knoppix@ttyp0[knoppix]$ sudo gpart -W /dev/hda /dev/hda


    This isn't a typo; you do actually put /dev/hda twice in the command. You can potentially tell gpart to write the partition table to a second drive, based on what it detected on the first drive. Once the partition table has been written, reboot and attempt to access the drives again. If you get errors when mounting the drives, check the partitioning within Knoppix with a tool like fdisk, cfdisk, or qtparted to see whether gpart has incorrectly guessed where your partition ends. I've had to modify a partition that gpart ended 4 MB too early, but afterwards, the filesystem mounted correctly, and I was able to access all of my files.

    It is scary to be in a position where you must think about partition-table recovery. At least with Knoppix and gpart, it's possible to recover the partition table without completely reinstalling the operating system.

  4. #4
    Member registered user
    Join Date
    Jul 2009
    Posts
    38
    I know this is an old thread but I just wanted to say that I used this tutorial last night to recover my partition table and it worked flawlessly. Thanks to all the developers for such awesome programs as gpart. I just can't believe all the stuff linux will do.

    I hit set disk label in gparted thinking I was going to be able to set a label on my partition and lost my partition table.

Similar Threads

  1. Help with windows system file restore
    By kaptan in forum General Support
    Replies: 5
    Last Post: 08-08-2007, 12:23 AM
  2. Backup/Restore to DVD from Knoppix?
    By vogelap in forum Ideas
    Replies: 1
    Last Post: 01-21-2007, 06:14 PM
  3. How do I use Knoppix to restore Win 9X Hdd.
    By borgward in forum MS Windows & New to Linux
    Replies: 6
    Last Post: 03-01-2006, 11:51 AM
  4. How can I do a system restore on XP Home through knoppix?
    By mikesuth18 in forum MS Windows & New to Linux
    Replies: 6
    Last Post: 08-21-2005, 06:26 PM
  5. Knoppix to restore RH9 Kernel
    By ncsuapex in forum General Support
    Replies: 9
    Last Post: 12-21-2004, 12:55 AM

Posting Permissions

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


IBM System X3850-X5 Server w/4x Intel  Xeon E7-4870 CPU , 512 GB DDR3 RAM,NO HDD picture

IBM System X3850-X5 Server w/4x Intel Xeon E7-4870 CPU , 512 GB DDR3 RAM,NO HDD

$1599.99



IBM QRadar xx29 2x Xeon E5-2650v4 2x 900W PSU M5120 12x 3.5

IBM QRadar xx29 2x Xeon E5-2650v4 2x 900W PSU M5120 12x 3.5" Bay Server No RAM

$179.99



Unused IBM 09P0037 MAINBOARD For  RS/6000 7044-170 P-Series picture

Unused IBM 09P0037 MAINBOARD For RS/6000 7044-170 P-Series

$375.00



IBM EMC 091-000-091 17 Inch Rackmount LCD Keyboard KVM Console 03N7012 picture

IBM EMC 091-000-091 17 Inch Rackmount LCD Keyboard KVM Console 03N7012

$109.99



IBM Power 8 S822L Server 8247-22L POWER8 Enterprise 256GB RAM 2x 00KV626 CPU picture

IBM Power 8 S822L Server 8247-22L POWER8 Enterprise 256GB RAM 2x 00KV626 CPU

$999.99



IBM System x3550 M3 1U Server 2x Xeon E5645, 192GB RAM, 2x 300GB HDD (7944-AC1) picture

IBM System x3550 M3 1U Server 2x Xeon E5645, 192GB RAM, 2x 300GB HDD (7944-AC1)

$150.00



IBM SYSTEM X3500 M3 SERVER 7380AC1 TOWER Server XEON E5620 8GB RAID SEE NOTES picture

IBM SYSTEM X3500 M3 SERVER 7380AC1 TOWER Server XEON E5620 8GB RAID SEE NOTES

$110.30



1 X IBM 720 POWER SERVER WITH 32 GB RAM picture

1 X IBM 720 POWER SERVER WITH 32 GB RAM

$344.97



IBM ADP Server Type 7870 AC1 NO HDD | 128GB RAM PC3L | 2 x Xeon  E5620 picture

IBM ADP Server Type 7870 AC1 NO HDD | 128GB RAM PC3L | 2 x Xeon E5620

$199.99



DELL POWEREDGE HP IBM SERVER XEON GOLD 5315Y 8 CORE PROCESSOR 3.2 GHZ SRKXR picture

DELL POWEREDGE HP IBM SERVER XEON GOLD 5315Y 8 CORE PROCESSOR 3.2 GHZ SRKXR

$1100.00