Results 1 to 3 of 3

Thread: Mounting XP NTFS HD...

  1. #1
    Join Date
    Jul 2009
    Location
    Caracas, RB Venezuela
    Beans
    20
    Distro
    Ubuntu 10.04 Lucid Lynx

    Exclamation Mounting XP NTFS HD...

    I reinstall Windows XP, after that I had to rescue the GRUB because Windows would not allow me to boot into Linux Ubuntu; but now I cannot load windows. When I was repairing the GRUB, I set sda1 as /windows. the bootloader says it is on (hd0,0) and when I try mounting the NTFS partition which is like this:

    Code:
    root@latinhacker-14:~# fdisk -l
    
    Disk /dev/sda: 40.0 GB, 40000000000 bytes
    255 heads, 63 sectors/track, 4863 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x9dc96e9e
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1        2566    20611363+   7  HPFS/NTFS
    /dev/sda2            2567        4863    18450652+   5  Extended
    /dev/sda5            2567        4845    18306036   83  Linux
    /dev/sda6            4846        4863      144553+  82  Linux swap / Solaris
    
    mkdir /media/LatinHacker
    root@latinhacker-14:~# mount /dev/sda1 -t ntfs /media/LatinHacker
    Unexpected clusters per mft record (-1).
    Failed to mount '/dev/sda1': Invalid argument
    The device '/dev/sda1' doesn't seem to have a valid NTFS.
    Maybe the wrong device is used? Or the whole disk instead of a
    partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
    I also tried:

    Code:
    mount /dev/sda1 /media/LatinHacker
    
    mount: you must specify the filesystem type
    What should I do?
    Quote Originally Posted by PabloTwo;1246684 Frm Fedora Forums
    I'm not sure if it will make any difference, but try the mount command this way:
    Code:
    mount -t ntfs /dev/sda1 /media/LatinHacker
    ...without splitting the /dev/partition and /mountpoint with the -t option.
    Apparently the partition /dev/sda1 got damaged, I think it was because as I was repairing the GRUB, I discovered some anomalies on /dev/sda1 and on /dev/sdb1,2 so I ran fdisk, and I verified them, and then re-wrote the content table.

    The weird thing is that, my boot flag is on /dev/sda1 which suggest that it is, at some level, working, I tried changing my boot flag to /dev/sda5 but the BIOS told me that there was no OS. So, I had to turned the boot flag back to /dev/sda1 from the Live CD using GParted.

    My next question would be, Is there a way to move my GRUB system to /dev/sda5? So that I can create an image backup of my Linux System and re-installed XP. and then restored to /dev/sda5 the whole system as it is now, including the GRUB.

    Now, I suspect, that if the boot flag is on /dev/sda1, even if from a Live CD I restore the Linux system, I would have to turned from this Live CD the boot flag, back to /dev/sda5 and that would make everything alright. Since GRUB is already configured to start XP from (hd0,0). Am I right?
    Last edited by LatinHacker; July 29th, 2009 at 07:50 PM. Reason: Used wrong code...

  2. #2
    Join Date
    Jul 2009
    Location
    Caracas, RB Venezuela
    Beans
    20
    Distro
    Ubuntu 10.04 Lucid Lynx

    Unhappy Re: Mounting XP NTFS HD...

    Nothing worked, I had to reinstall both systems, Windows 1st and then, Linux Ubuntu.

  3. #3
    Join Date
    Jul 2005
    Location
    Hughenden, Australia
    Beans
    5,100
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    Re: Mounting XP NTFS HD...

    When I was repairing the GRUB, I set sda1 as /windows. the bootloader says it is on (hd0,0)
    Hello LatinHacker,
    I'm sorry to read of your problems with Windows XP and I'm sorry I'm too late to be of any help.
    It appears as if you have installed GRUB to the boot sector of your Windows partition, which is not a good thing to do.
    Everything would have been okay if you had installed to MBR in your first hard disk instead.
    Now, I suspect, that if the boot flag is on /dev/sda1, even if from a Live CD I restore the Linux system, I would have to turned from this Live CD the boot flag, back to /dev/sda5 and that would make everything alright. Since GRUB is already configured to start XP from (hd0,0). Am I right?
    GRUB doesn't need the boot flag and neither does Linux, the boot flag, if anywhere, should be allowed to remain on your Windows partition, but the position of the boot flag isn't the main problem here at all.

    Let me explain a few terms.
    The MBR of your first hard disk, (where you should install GRUB, (or rather, code pointing to GRUB), is in the first sector of every hard disk, and in addition GRUB uses some of the sectors after that in the first track of the hard disk, which is normally empty.
    Your MBR is designated as /dev/sda in Linux and (hd0) by GRUB.

    Your Windows boot sector is the first sector of your Windows partition, commonly located in sector number 63 if you have Windows XP or earlier. Your Windows boot sector needs to contains pointers to the Windows boot loader so you can boot Windows.
    Your Windows boot sector is designated as /dev/sda1 by Linux if Windows is in partition number1, which is usually the case.
    This is called (hd0,0) by GRUB, and you should never install GRUB to your Windows boot sector, as you found out.

    Ways you could have repaired your Windows installation include,


    , or for Windows XP or later with NTFS,


    ... to name a few.

    The reason why mistakes like this happen is because there are many so called 'experts' who continue to confuse the terms 'MBR' and 'boot sector' interchangeably, and to make matters even worse, some people refer to a mythical thing they call 'the Windows MBR'.
    People new to Linux read these misnomers and naturally they are confused and misled.

    To avoid repeating the same mistake in the future you just need to learn the difference between a MBR (the first sector of a hard disk), and a boot sector, (the first sector of a Windows partition), and how Linux and GRUB partition numberings work.


    Ubuntu user since 2004 (Warty Warthog)

Bookmarks

Posting Permissions

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