Results 1 to 15 of 26

Thread: HOW-TO say Open Sesame to your internal disk

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2007
    Location
    The Netherlands
    Posts
    244

    Lightbulb HOW-TO say Open Sesame to your internal disk

    Took the drive out of the white box, pushed it in a usb case, attached it to my pc, gave it a working partition table, and that was all to say Open Sesame to the internal hard disk of the Asus WL-700Ge: see attachment
    This picture shows what you are about to see if you do the same.

    This makes all sorts of new and unthought things possible: recover from that little stupid mistake that rendered your box to a brick – backup all the data – replace the disk with a larger one without losing a single bit – grab your data much quicker – etc.

    Now, if you are curious for the gory details, read on. I will explain in extenso what I did and it will give you the little recipe to get you going.

    The recipe
    1. Take the disk out of the Asus. It can be opened very easily. You'll see a screw in the middle of a silver case, unscrew it, and take the lid off. You'll break the warranty, but only for the disk, not for the other hardware. You'll have to get it loose with care and power.
      Next, put it in something that you can use at your pc. I took a usb diskcase for that matter.
    2. Start up your Linux pc. Oh, what, you have something different? Well, grab hold on a Knoppix DVD www.knoppix.org, that will give you a comfortable GUI to play with, or, if you're more brave, get yourself a Linux rescue disk www.sysresccd.org. It won't be so nice to look at, but it comes with all kind of goodies you will love to have, once acquainted to it. As the Asus itself uses Linux, and the disk is formatted with ReiserFS, you must use something capable for it. Why not take the plunge and install some sort of Linux next to what you're used to until now? Well, I leave you to decide what to do.
    3. The Asus disk will have a name as /dev/sda or /dev/sdb, dev/sdc etc, depending on how many other USB drives or sticks it sees. Let me assume it is /dev/sda. Now, run
      Code:
      fdisk /dev/sda
      You will have to do this as root.
    4. You can tell it is the Asus disk when fdisk says that the drive has no valid partition table. Ok, now just leave fdisk, with
      Code:
      q
      First we will and must make a backup of the first 512 bytes of the disk that contains this invalid partition table, or else your with brick won't start up.
    5. Backing up the MBR or first 512 bytes is as easy as this:
      Code:
      dd if=/dev/sda of=asus-mbr-original bs=512 count=1
      What you specify after of= makes all the difference: that is the file you will need to restore later on. So make sure you have it, and don't loose it.
    6. Now that we have a backup of the MBR, we can savely give the disk a new partition table. Run
      Code:
      fdisk /dev/sda
      again. Give
      Code:
      u
      to change the from cylinder input to sector input. The Reiser partition starts at a sectorboundary, that's because. Now make a new partition:
      Code:
      n p 1
      fdisk will ask for the first sector. Here comes the magic secret: 1262160. Next, for the last sector, just hit enter. It will define a Linux partition starting from sector 1262160 and occupying the rest of the disk. Check this with
      Code:
      p
      and then, then...
      Code:
      w
      to write it. Don't sweat, you have a backup, don't you? This write operation will only touch the first 512 bytes of the disk.
    7. If you did it right, you can say open sesame with
      Code:
      mount /dev/sda1 /mnt/asus
      in which /mnt/asus is just a directory you made before, didn't you?
      Now, all what you normally find in /shares/MYVOLUME1 you'll find in /mnt/asus. DONE.
    8. If you did it wrong, mounting /dev/sda1 will fail, that's all. I'm pretty sure that 1262160 is the starting sector. It is so for my 250GB disk, and I guess it will be the same for a 160GB disk or whatever size disk your Asus came with.
    9. All done? You'll have to restore the MBR, with
      Code:
      dd of=/dev/sda if=asus-mbr-original
      Don't forget that, or else the Asus won't start at all. And don't mix if and of!!

    Some remarks
    • I made a complete backup of the disk with dd if=/dev/sda of=/dev/sdb in which sdb was my backup disk. It took a mere 13 hours, and dd is not of the talkative kind. Better use ddrescue, that comes with the rescue disk.
    • If you want to transfer your disk to a larger one, use dd or ddrescue to copy all sectors until nr 1262160, that is about 600 MiB. Next, use partimage to backup the reiserfs partition from your original disk, define a new partition on your new disk occupying sector 1262160 to the end, and restore this with partimage, and resize it. The rescue cd has all the programs.
    • The disk starts with a Broadcom sign and with a compressed partition of about 600 MiB, containing probably the firmware. This means that a mirror disk of MYVOLUME1 is not enough to replace a faulty internal disk. It has to have the complete content.


    I like to thank Jan van Wijk http://www.dfsee.com for his assistance in finding the startposition of MYVOLUME1
    Attached Images Attached Images  
    Last edited by mumsoft; 22-08-2007 at 13:26. Reason: Clarifications and thank to Jan van Wijk.

Similar Threads

  1. HOW-TO make an external disk usable for PC and NAS
    By mumsoft in forum WL-700g Tutorials
    Replies: 13
    Last Post: 24-04-2008, 13:08
  2. What filesystem is on main/mirror disk?
    By MaxCorvette in forum WL-700g Q&A
    Replies: 24
    Last Post: 05-09-2007, 02:38
  3. 700g internal disk mistery
    By iczfirz in forum WL-700g Q&A
    Replies: 3
    Last Post: 13-06-2007, 16:14
  4. Turn off internal hard disk on WL700ge?
    By Bunny Rabbit in forum WL-700g Firmware Discussion
    Replies: 12
    Last Post: 02-12-2006, 18:56
  5. WL-HDD, where's my internal disk
    By grunchy in forum WL-HDD Q&A
    Replies: 1
    Last Post: 30-05-2006, 18:29

Posting Permissions

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