LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Ntfs partition lost after reinstall grub (https://www.linuxquestions.org/questions/linux-newbie-8/ntfs-partition-lost-after-reinstall-grub-566359/)

enrico_dvchp 07-03-2007 01:21 PM

Ntfs partition lost after reinstall grub
 
Hi all,
I have an Athlon 64 3700+\Nvidia Geforce FX5500 + Ubuntu Edgy Eft.
I have dual booted well both Linux and Windows XP until yesterday. The prob arose as I installed gfxboot to have a Suse-like Grub. I have not had the good idea to take a backup of my mbr by using the dd command. :(
I hope it is possible to recover my XP partition with your suggestions.
I can give you some information about my o.s..
---------------------------------------------------------CURRENT PARTITIONS ----------------------------------------
armonica@persik-desktop:~$ sudo fdisk -l
Password:
Disk /dev/sda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 9249 74292561 7 HPFS/NTFS # I can't have any access to it. The others works well now.#
/dev/sda2 9250 11531 18330165 c W95 FAT32 (LBA)
/dev/sda4 16145 24321 65681752+ 5 Extended
/dev/sda5 16145 16291 1180746 82 Linux swap / Solaris
/dev/sda6 16292 24321 64500943+ 83 Linux
---------------------------------------------------------CURRENT EDGY FSTAB----------------------------------------
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda6
UUID=a6515639-89a1-4753-a488-94309cc1ec80 / ext3 defaults,errors=remount-ro 0 1
# /dev/sda1
UUID=E4C0300AC02FE212 /media/pippo ntfs defaults,nls=utf8,umask=0222,gid=46 0 0
# /dev/sda2
UUID=1006-16B2 /media/pluto vfat defaults,utf8,umask=0000,gid=46 0 0
# /dev/sda3
# UUID=c0ec6d7e-f4b4-40d5-ab11-a04b99ec3392 /media/sda3 ext3 defaults 0 2
# /dev/sda5
UUID=9206b41a-6f52-477e-8394-bdfadc71329e none swap sw 0 0
/dev/hdd /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/hdc /media/cdrom1 udf,iso9660 user,noauto 0 0
/dev/sda2 /media/pluto vfat defaults 0 0
/dev/sda1 /media/pippo ntfs nls=iso8859-1,users,umask=0222,user,ro 0 0
/dev/sda5 /media/sda5 swap defaults 0 0
------------------------------------ MOUNT ERRORS-------------------------------------------------------------
armonica@persik-desktop:~$ sudo mount -a
Password:
mount: special device /dev/disk/by-uuid/E4C0300AC02FE212 does not exist
mount: wrong fs type, bad option, bad superblock on /dev/sda1,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
----------------------------------------------DMSG OUTPUT ----------------------------------------------------------
armonica@persik-desktop:~$ dmesg | tail
[17180099.296000] NTFS-fs error (device sda1): read_ntfs_boot_sector(): Mount option errors=recover not used. Aborting without trying to recover.
[17180099.296000] NTFS-fs error (device sda1): ntfs_fill_super(): Not an NTFS volume.
[17180216.748000] NTFS-fs warning (device sda1): is_boot_sector_ntfs(): Invalid boot sector checksum.
[17180216.748000] NTFS-fs error (device sda1): read_ntfs_boot_sector(): Primary boot sector is invalid.
[17180216.748000] NTFS-fs error (device sda1): read_ntfs_boot_sector(): Mount option errors=recover not used. Aborting without trying to recover.
[17180216.748000] NTFS-fs error (device sda1): ntfs_fill_super(): Not an NTFS volume.
[17180247.524000] NTFS-fs warning (device sda1): is_boot_sector_ntfs(): Invalid boot sector checksum.
[17180247.524000] NTFS-fs error (device sda1): read_ntfs_boot_sector(): Primary boot sector is invalid.
[17180247.524000] NTFS-fs error (device sda1): read_ntfs_boot_sector(): Mount option errors=recover not used. Aborting without trying to recover.
[17180247.524000] NTFS-fs error (device sda1): ntfs_fill_super(): Not an NTFS volume.
---------------------------------------------------------------------------------------------------

Thanks in advance,

unconcrete

jschiwal 07-04-2007 10:09 PM

According to your fdisk -l listing, it doesn't look like the partition structure is whacked. If you have ntfsprogs installed, you could check it out with
ntfsinfo -m /dev/sda1

There is an ntfsfix program which might be able to fix it enough for the windows program to check the partition and repair it.

You can also try the "errors=continue" option instead of "errors=recover". ( These two options are listed in the kernel's ntfs.txt file, but not in the mount manpage.)

enrico_dvchp 07-05-2007 01:54 PM

Hi,
this is the output of ntfsinfo:
armonica@persik-desktop:~$ ntfsinfo -m /dev/sda1
Unknown option '/dev/sda1'.
You must specify exactly one device.

Usage: ntfsinfo [options] -d dev
-d dev --device dev The ntfs volume to display information about
-i num --inode num Display information about this inode
-F file --file file Display information about this file (absolute path)
-m --mft Dump information about the volume
-t --notime Don't report timestamps

-f --force Use less caution
-q --quiet Less output
-v --verbose More output
-V --version Display version information
-h --help Display this help

Developers' email address: linux-ntfs-dev@lists.sourceforge.net
Linux NTFS homepage: http://linux-ntfs.sourceforge.net
----------------------------------------------------------------
At the time the utility doesn't recognize my hard drive or at least, it finds a linux partition and a hard drive but it can't find the first partition of the only hd (sda1) the ntfs one.
Other suggestions?

unconcrete

jiml8 07-05-2007 02:19 PM

Partition structure isn't showing sda3 and there is a hole in the partition structure evident from fdisk. However fstab is showing sda3. Also fstab has two entries for sda5. Not sure what happens here.

You might try commenting out the fstab entry for sda1 and replacing it with a line like this:
Code:

/dev/sda1 /media/pippo ntfs user,umask=0,noauto,exec,iocharset=is
o8859-1,owner 0 0

I don't know if that will help you, but it is the "classic" way to mount a drive and therefore might be more reliable than the UUID method which, after all, is claiming that the device doesn't exist.

Enochs 07-05-2007 03:05 PM

Does the new Grub start Linux?
 
Good news. The new Suse-Grub would not have altered your partions at all so your data is still there...safe and sound. You just have to find it. Is the new Suse-Grub working?...Can you boot into Linux? If so then please post your /boot/grub/menu.lst file? You may just need to identify your Windows OS in this file if it was over written when you installed the new Grub.

Enochs 07-05-2007 03:18 PM

A Link...
 
Here is a link from someone with a similar problem. Near the bottom there are several good sugesstions.

https://bugs.launchpad.net/ubuntu/+s...rub/+bug/21175


When you install grub in the first sector of Windows partition, ex. /dev/sda1 or /dev/hda1, you will get an error 17, which means grub does not recognize the NTFS (Windows) file system. These are the errors I see above. Grub should be installed in /dev/sda and not sda1. please post your boot/grub/menu.lst file.

If your menu.lst file is correct and Grub wasn't loaded in /dev/sda1 by mistake then I would rebuild my master boot record by running the fixmbr command followed by the fixboot command. This will kill GRUB and boot you into Windows using the Windows default bootloader.

Jay

saikee 07-05-2007 03:59 PM

I would do two things

(1) I would try to boot it manually. Under the normal circumstance in Ubuntu's Grub screen pressing the "c" key will drop the user into a Grub shell. If this is the case XP will fire up if it is any good by commands
Code:

root (hd0,0)
chainloader +1
boot

If Ubuntu's Grub screen has been replaced by a graphic screen then I would make a bootable Grub floppy or Grub CD to do the same job until I am satisfied my XP is no longer bootable. The bootable Grub floppy and CD can be made in accordance with Grub Manual Chapter 3.1 and 3.4, involving copying only 2 and 1 files respectively.

(2) I would mount the partition manually and check if I could access it by another Linux. This can be done in an installed Linux or just from a Live CD. In root terminal
Code:

mkdir /mnt/sda1
mount /dev/sda1 /mnt/sda1
ls /mnt/sda1


jschiwal 07-06-2007 06:26 AM

You need to run ntfsinfo as root so it has rights to read the device.

Skipping to /dev/hda4 is normal. That means it is the extended partition. "There can be only one."

jiml8 07-06-2007 11:11 AM

Quote:

Originally Posted by jschiwal
Skipping to /dev/hda4 is normal. That means it is the extended partition. "There can be only one."

Not true.

There can be only one extended partition but it does not have to be the last one in the partition table. It can be any of them, and you can have one or more normal physical partitions after it if you wish.

And if you read the output of the fdisk, you will see that the cylinder boundaries clearly show a hole in the partition table, with a big gap between the end of sda2 and the beginning of sda4.

You need to be certain of your facts before pronouncing them.

enrico_dvchp 07-06-2007 11:34 AM

Grub can't find ntfs
 
Quote:

Originally Posted by Enochs
Good news. The new Suse-Grub would not have altered your partions at all so your data is still there...safe and sound. You just have to find it. Is the new Suse-Grub working?...Can you boot into Linux? If so then please post your /boot/grub/menu.lst file? You may just need to identify your Windows OS in this file if it was over written when you installed the new Grub.

Yes, my new grub is working but only for Linux. This is my /boot/grub/menu.lst:
gfxmenu /boot/grub/message.cristal
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not change this entry to 'saved' or your
# array will desync and will not let you boot your system.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=a6515639-89a1-4753-a488-94309cc1ec80 ro
# kopt_2_6=root=/dev/sda6 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,5)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## ## End Default Options ##
# Splashimage
# foreground = 0000ff
# background = ffffff
# splashimage=(hd0,5)/boot/grub/splashimages/hpp.xpm.gz

title Ubuntu, kernel 2.6.17-10-generic
root (hd0,5)
kernel /boot/vmlinuz-2.6.17-10-generic root=/dev/sda6 ro quiet splash
initrd /boot/initrd.img-2.6.17-10-generic
quiet
savedefault
boot

title Ubuntu, kernel 2.6.17-10-generic (recovery mode)
root (hd0,5)
kernel /boot/vmlinuz-2.6.17-10-generic root=/dev/sda6 ro single
initrd /boot/initrd.img-2.6.17-10-generic
boot

title Ubuntu, memtest86+
root (hd0,5)
kernel /boot/memtest86+.bin
quiet
boot

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Professional
root (hd0,0)
savedefault
makeactive
chainloader +1


# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda3.
# title Ubuntu, kernel 2.6.15-27-386 (on /dev/sda3)
# root (hd0,2)
# kernel /boot/vmlinuz-2.6.15-27-386 root=/dev/sda3 ro quiet splash
# initrd /boot/initrd.img-2.6.15-27-386
# savedefault
# boot


# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda3.
# title Ubuntu, kernel 2.6.15-27-386 (recovery mode) (on /dev/sda3)
# root (hd0,2)
# kernel /boot/vmlinuz-2.6.15-27-386 root=/dev/sda3 ro single
# initrd /boot/initrd.img-2.6.15-27-386
# savedefault
# boot


# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda3.
# title Ubuntu, kernel 2.6.15-23-386 (on /dev/sda3)
# root (hd0,2)
# kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/sda3 ro quiet splash
# initrd /boot/initrd.img-2.6.15-23-386
# savedefault
# boot


# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda3.
# title Ubuntu, kernel 2.6.15-23-386 (recovery mode) (on /dev/sda3)
# root (hd0,2)
# kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/sda3 ro single
# initrd /boot/initrd.img-2.6.15-23-386
# savedefault
# boot


# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda3.
# title Ubuntu, memtest86+ (on /dev/sda3)
# root (hd0,2)
# kernel /boot/memtest86+.bin
# savedefault
# boot

Thank you and bye soon

unconcrete

enrico_dvchp 07-06-2007 11:53 AM

Quote:

Originally Posted by Enochs
Here is a link from someone with a similar problem. Near the bottom there are several good sugesstions.

https://bugs.launchpad.net/ubuntu/+s...rub/+bug/21175


When you install grub in the first sector of Windows partition, ex. /dev/sda1 or /dev/hda1, you will get an error 17, which means grub does not recognize the NTFS (Windows) file system. These are the errors I see above. Grub should be installed in /dev/sda and not sda1. please post your boot/grub/menu.lst file.

If your menu.lst file is correct and Grub wasn't loaded in /dev/sda1 by mistake then I would rebuild my master boot record by running the fixmbr command followed by the fixboot command. This will kill GRUB and boot you into Windows using the Windows default bootloader.

Jay

I think i've actually installed grub in sda1. This is my boot/grub/menu.lst:
---------------------------
gfxmenu /boot/grub/message.cristal
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not change this entry to 'saved' or your
# array will desync and will not let you boot your system.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=a6515639-89a1-4753-a488-94309cc1ec80 ro
# kopt_2_6=root=/dev/sda6 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,5)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
---------------------------------------------------------

unconcrete

enrico_dvchp 07-06-2007 12:05 PM

Quote:

Originally Posted by saikee
I would do two things

(1) I would try to boot it manually. Under the normal circumstance in Ubuntu's Grub screen pressing the "c" key will drop the user into a Grub shell. If this is the case XP will fire up if it is any good by commands
Code:

root (hd0,0)
chainloader +1
boot

If Ubuntu's Grub screen has been replaced by a graphic screen then I would make a bootable Grub floppy or Grub CD to do the same job until I am satisfied my XP is no longer bootable. The bootable Grub floppy and CD can be made in accordance with Grub Manual Chapter 3.1 and 3.4, involving copying only 2 and 1 files respectively.

(2) I would mount the partition manually and check if I could access it by another Linux. This can be done in an installed Linux or just from a Live CD. In root terminal
Code:

mkdir /mnt/sda1
mount /dev/sda1 /mnt/sda1
ls /mnt/sda1


I've tried the second way first, this is the output:
armonica@persik-desktop:~$ mount/dev/sda1 /media/pippo
bash: mount/dev/sda1: No such file or directory
armonica@persik-desktop:~$ mount/dev/sda1 /media/sda1
bash: mount/dev/sda1: No such file or directory
armonica@persik-desktop:~$ ls /media/sda1
At the moment it is no possible to mount normally sda1.
Now I'll get the grub manual to know how to build a grub recue cd.

Thanks,
unconcrete

enrico_dvchp 07-06-2007 12:38 PM

Quote:

Originally Posted by jiml8
Not true.

There can be only one extended partition but it does not have to be the last one in the partition table. It can be any of them, and you can have one or more normal physical partitions after it if you wish.

And if you read the output of the fdisk, you will see that the cylinder boundaries clearly show a hole in the partition table, with a big gap between the end of sda2 and the beginning of sda4.

You need to be certain of your facts before pronouncing them.

In my system, the last partion is actually an extended one. Until now anyway all has been working well. The gap between the partition depends on the fact I've created a reiser partition to install Fedora or another distro, but since I've created more than 4 partitions, I've deleted it and left the space as unallocated for future use.
Have I to remove the unallocated space between VFAT and ext3 partitions?
This is the scheme:
/dev/sda1 --ntfs -- pippo -- 70GB -- boot
/dev/sda2 --fat32-- pluto -- 17,48GB --lba
/dev/sda3 --unallocated -- 35,34GB
/dev/sda4 --extended -- 62,64GB
/dev/sda5 --swap --1,13 GB
/dev/sda6 --ext3 --/,/dev/.static/dev --61,51 GB

enrico_dvchp 07-06-2007 12:43 PM

Quote:

Originally Posted by jiml8
Partition structure isn't showing sda3 and there is a hole in the partition structure evident from fdisk. However fstab is showing sda3. Also fstab has two entries for sda5. Not sure what happens here.

You might try commenting out the fstab entry for sda1 and replacing it with a line like this:
Code:

/dev/sda1 /media/pippo ntfs user,umask=0,noauto,exec,iocharset=is
o8859-1,owner 0 0

I don't know if that will help you, but it is the "classic" way to mount a drive and therefore might be more reliable than the UUID method which, after all, is claiming that the device doesn't exist.

This is my fstab now. Do you think it is right?
---------------------------------------------------
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda6
UUID=a6515639-89a1-4753-a488-94309cc1ec80 / ext3 defaults,errors=remount-ro 0 1
# /dev/sda1
#UUID=E4C0300AC02FE212 /media/pippo ntfs defaults,nls=utf8,umask=0222,gid=46 0 0
#
/dev/sda1 /media/pippo ntfs user,umask=0,noauto,exec,iocharset=iso8859-1,owner 0 0
# /dev/sda2
UUID=1006-16B2 /media/pluto vfat defaults,utf8,umask=0000,gid=46 0 0
# /dev/sda3
# UUID=c0ec6d7e-f4b4-40d5-ab11-a04b99ec3392 /media/sda3 ext3 defaults 0 2
# /dev/sda5
UUID=9206b41a-6f52-477e-8394-bdfadc71329e none swap sw 0 0
/dev/hdd /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/hdc /media/cdrom1 udf,iso9660 user,noauto 0 0
/dev/sda2 /media/pluto vfat defaults 0 0
# /dev/sda1 /media/pippo ntfs nls=iso8859-1,umask=0222 0 0
/dev/sda5
-------------------------------------------------

unconcrete

Enochs 07-06-2007 01:24 PM

Beats me?
 
Wow, that menu.list has the most commented lines I have ever seen! It makes for a long and confusing read. My menu.lst is no longer than this response. I have been informed that GRUB will give error 17 and not run at all if loaded in sda1 so this may not be the case, sorry. I didn't see anything obvious but before I close that file I would try two simple things, just for shits and giggles. Neither of these suggestions follows any logic so don't laugh when you read them but I am out of logical ideas. I wish I could have been of more help. I hope you find a solution.

1. Just above your Windows XP entry, GRUB placed these two lines:
title Other operating systems:
root

Comment them both out with #. reboot and select Windows XP.
I don't see a need for them and the keyword root...followed by no root??? Very odd. This entry should not affect the Windows XP entry below it but I would clean it up anyway. Reboot and try XP again before doing #2.

2. Change (hd0,0) to read (hd0,1)as shown below. hd0,0 should be correct so if it doesn't work then change it back. This shouldn't work but I googled another thread that stated this DID work for another person...then again I could find just about anything online if I looked long enough. I am curious to see if it works. Good luck.

title Microsoft Windows XP Professional
root (hd0,1)
savedefault
makeactive
chainloader +1

saikee 07-06-2007 02:05 PM

There are few things worth knowing

(1) The "#" infront of any line in menu.lst is to disable it. Such line is used for commentary only and will not be executed by Grub.

(2) This line
Code:

gfxmenu /boot/grub/message.cristal
should be disabled temporarily by a "#" like this
Code:

#gfxmenu /boot/grub/message.cristal
The reason is simple . You need a Grub prompt to help you to resolve the booting problem but the gfxmenu robs you of the possibility to activate the Grub prompt.

Once the above line has been disabled, on a reboot you can activate a Grub prompt by pressing the "c" key on seeing the booting screen.

(3) The instruction I have given in Post #7 has not been follow. In particular
Code:

mkdir /mnt/sda1
if you do not make a subdirectory /mnt/sda1 of course Linux would complain "No such file or directory". The idea is you mount the sda1 device (with xp partition inside) on a temporary subdirectory of your the LInux filing system.

If you correct Item (2) you should be able to get a Grub prompt.

Your XP is being booted by these lines in menu.lst
Code:

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Professional
root (hd0,0)
savedefault
makeactive
chainloader +1

You can manually boot XP by the similar commands in a Grub prompt
Code:

root (hd0,0)
chainloader +1
boot

The statements that I did not use are optional but the "boot" statement is needed for every manual booting. I can't guarantee it will boot but Grub will inform you any line that it cannot comply with and so this will enable for you to pin point the exact command that is causing the problem

Please report the finding.

enrico_dvchp 07-07-2007 05:32 AM

Re: Beats me?
 
Very sorry for the redundancy of my menu.lst, but since I have an well defined idea about what is important or not, I've reported it as it is.
I've tried both your suggestions. I've commented out the statements "Other operating systems" and "root" and rebooted. No effect. Ntfs partition remains blocked. In rescue mode, I've changed the statement "root (hd0,0) to (hd0,1)and rebooted. As I choose Windows XP i have this output:
"
root(hd0,1)
filesystem type is fat, partition type 0xc
savedefaults
makeactive
chainloader +1
Non system disk press any key...
DISK BOOT FAILURE, INSERT SYSTEM DISK AND PRESS ENTER"
So I have restored the old root (hd0,0).

Thanks anyway, and hope to have your suggestions.
The forum is great!
unconcrete

PS.: Now this is my current menu.lst. I hope to have reported the right lines.
gfxmenu /boot/grub/message.cristal
# menu.lst - See: grub(8), info grub, update-grub(8)
...
## default num
default 0
## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
...
timeout 10
...
# Pretty colours
color cyan/blue white/blue
...
### BEGIN AUTOMAGIC KERNELS LIST
...
## ## End Default Options ##
#
title Ubuntu, kernel 2.6.17-10-generic
root (hd0,5)
kernel /boot/vmlinuz-2.6.17-10-generic root=/dev/sda6 ro quiet splash
initrd /boot/initrd.img-2.6.17-10-generic
quiet
savedefault
boot

title Ubuntu, kernel 2.6.17-10-generic (recovery mode)
root (hd0,5)
kernel /boot/vmlinuz-2.6.17-10-generic root=/dev/sda6 ro single
initrd /boot/initrd.img-2.6.17-10-generic
boot

title Ubuntu, memtest86+
root (hd0,5)
kernel /boot/memtest86+.bin
quiet
boot
### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian ones.
title Other operating systems:
root

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Professional
root (hd0,0)
savedefault
makeactive
chainloader +1

saikee 07-07-2007 06:52 AM

enrico_dvchp,

I don't think we understand each other.

Let's try your bits first

In the Post #16 I have suggested to you to disable the fgxmenu statement temporary by adding a "#" in front. This allows you to claim it back at any future time by removing the "#" when everything works OK. Without the fgxmenu statement you can manually boot up XP, by instructions supplied in the latter part of post #6. Your menu.lst tells us that you don't want to do that. The fgxmenu, according to your post #1, seems to have caused all these problems but you apparently rather stick with it.

When you manually boot a system Grub interprets each line and shout out an error message if it can't complies. That would have enabled you to identify the exact line Grub has found the error.

No you rather not to have the capability of manual booting by keeping the fgxmenu.

In your post #17 you tell Grub the root is (hd0,1), which is your second partition sda2 and Grub reported a fat partition Type "c" has been found. There is no boot loader inside it and so Grub failed. My proposed instruction is to boot to root (hd0,0) and I don't know why you choose a different one.

You said you restored the old (hd0,0) but we are in the dark as to if it boots successfully now or not and if not what error did you get.

Now the bit that I have difficulty with

Linux, or more precisely Grub, has been able to see sda1 and knows it is a ntfs partition with partition ID 7. There is no error reported by Grub and you can use Linux to post all the necessary information here. Therefore you can in Linux mount the sda1 partition manually as suggested in post #12 (which you missed out the mkdir statement so it didn't work).

Your last post keeps saying "Ntfs partition remains blocked". Does this means in Ubuntu you can see the ntfs folder but it is locked by Ubuntu? or you just have a fundamental problem of booting the XP up?

My confusion is Ubuntu in a standard installation disallows you log in as root and so without root privilege the ntfs folder is "always" locked to an ordinary user. That is the security feature of Ubuntu and no doubt that must have been the reason why you go to bed with it.

Have you tried to mount it and take a peek inside as a root user(which you can obtain by command "sudo su" at the terminal)?

In my suggestion in Post #12 of
Code:

mkdir /mnt/sda1
mount /dev/sda1 /mnt/sda1
ls /mnt/sda1

the red line is meant to confirm if you can actually see the ntfs partition or not.

Thus without confirmation and more relevant information we are powerless to advise you further because your ntfs partition may be accessible but you didn't used the suggested commands. Your XP boots but you varied the command or not reporting the response.

You must help us with the appropriate information first so that we can help you.

enrico_dvchp 07-07-2007 06:59 AM

re to Post 7
 
I've commented out /boot/grub/message.cristal in menu.lst and created /mnt/sda1. At reboot, i can now have a grub console by pressing c so i've entered the command:
root (hd0,0) =>> Filesystem type unknown, partition type 0x7
chainloader +1
boot
escape and try grub again but nothing to do. Can't access ntfs and Windows XP. I've rebooted my system but it works as before.
:confused:

unconcrete

saikee 07-07-2007 07:08 AM

OK If I understand it correctly Grub has no complaint but nothing was delivered. Grub can't read a ntfs partition so it always report it as Filesystem type unknown, but by saying the partition type 0x7 means it is a ntfs partition and so the correct one has been picked up by Grub.


Now you also confirm /mnt/sda1 was made successfully. Did you mount it and can you "list" its content by the "ls" command?

If you get anything at all from "ls /mnt/sda1" that means the internal content is alright.

Lastly I take it XP doesn't boot and there is no error message if you boot it automatically by pressing the choice in the Grub menu.

My current thought is if XP doesn't respond to Grub then the XP partition may have been damaged/overwritten at the front end. You could be in serious trouble if the sda1 cannot be mounted because that implies the filing indexing system may have been damaged to the point Linux cannot find the files for you.

However if sda1 can be mounted then there is a good chance your personal data is salvageable.

enrico_dvchp 07-07-2007 11:47 AM

I've successfully created /mnt/sda1 but I can't mount it. I fact as I type ls /mnt/sda1 no output is reported:
armonica@persik-desktop:~$ ls /mnt/sda1
armonica@persik-desktop:~$

When I try to mount sda1 the system reports the following message:

armonica@persik-desktop:~$ sudo mount /dev/sda1 /mnt/sda1
mount: wrong fs type, bad option, bad superblock on /dev/sda1,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

armonica@persik-desktop:~$ dmesg | tail
[17182825.720000] NTFS-fs warning (device sda1): is_boot_sector_ntfs(): Invalid boot sector checksum.
[17182825.720000] NTFS-fs error (device sda1): read_ntfs_boot_sector(): Primary boot sector is invalid.
[17182825.720000] NTFS-fs error (device sda1): read_ntfs_boot_sector(): Mount option errors=recover not used. Aborting without trying to recover.
[17182825.720000] NTFS-fs error (device sda1): ntfs_fill_super(): Not an NTFS volume.
[17182865.172000] NTFS-fs warning (device sda1): is_boot_sector_ntfs(): Invalid boot sector checksum.
[17182865.172000] NTFS-fs error (device sda1): read_ntfs_boot_sector(): Primary boot sector is invalid.
[17182865.172000] NTFS-fs error (device sda1): read_ntfs_boot_sector(): Mount option errors=recover not used. Aborting without trying to recover.
[17182865.172000] NTFS-fs error (device sda1): ntfs_fill_super(): Not an NTFS volume.
[17183031.716000] Inbound IN=ppp0 OUT= MAC= SRC=17.82.29.158 DST=81.211.187.99 LEN=391 TOS=0x00 PREC=0x20 TTL=53 ID=55308 PROTO=UDP SPT=30738 DPT=1026 LEN=371
[17183107.500000] APIC error on CPU0: 40(40)
armonica@persik-desktop:~$
---
The row "[17182825.720000] NTFS-fs error (device sda1): read_ntfs_boot_sector(): Primary boot sector is invalid." tells me big troubles.
:study:
I think I have to recover the whole Windows partition.
I'll search for software to do it if possible.
Thanks for your patience.

Enrico_Dvchp +
Unconcrete

:newbie:

saikee 07-07-2007 05:38 PM

enrico_dvchp,

I think that is the end of the road for the Linux side. You may want to try the Windoze side by running the hard disk in another Windows computer to see if it can be read but I doubt that very much.

The error messages suggest the filing index in the superblock or boot sector is "dodgy". You can only inflict damage to this secure area by commands operating on the hardware directly like "dd". If you can remember how you did it you stand a better chance to rescue that partition.

Good luck to your rescue work and let us know if you overcome it as we all come here to learn.

enrico_dvchp 07-08-2007 03:05 AM

Rescue ntfs
 
I'll try to recover ntfs but i think i'll be forced to reinstall first XP and after Edgy.
Anyway thanks for now.
:study: :study: :study:
enrico_dvchp
:newbie:

enrico_dvchp 07-10-2007 02:28 PM

ntfs disappaired after grub reinstall
 
I've followed your suggestion and now I'm using my old Hiren-BootCD -All in One and I have good news and bad. The good one is that now Grub starts XP as before I reinstalled it. The bad is that NTFS is still not visible inside Ubuntu environment. I've followed this steps.
1) I've checked my hd sectors for defects, and it seems there is no error.
2) I've used the cd utility Partition Table Disk Doctor 3.0 to try a partition restore.
Actually PTDD had found some partition errors. Now I've modified only the ntfs partition since the others works well. in details:
ntfs partition = C starts at Cyl 0 Head 1 Sector 1 and ends to Cylinder 9248 Head 254 Sector 563 I've choosed the fixboot option and now Windows works! Wow! Victory, I thoght. Unfortunately once Ubuntu has started /mnt/sda1 opens an empty window. More work to do. Maybe it depends on a n error in my etc/fstab. This is the current fstab:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda6
UUID=a6515639-89a1-4753-a488-94309cc1ec80 / ext3 defaults,errors=remount-ro 0 1
# /dev/sda1
UUID=E4C0300AC02FE212 /media/pippo ntfs defaults,nls=utf8,umask=0222,gid=46 0 0
#
# /dev/sda2
UUID=1006-16B2 /media/pluto vfat defaults,nls=utf8,umask=0000,gid=46 0 0
#
# /dev/sda3
# UUID=c0ec6d7e-f4b4-40d5-ab11-a04b99ec3392 /media/sda3 ext3 defaults 0 2
# /dev/sda5
UUID=9206b41a-6f52-477e-8394-bdfadc71329e none swap sw 0 0
/dev/hdd /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/hdc /media/cdrom1 udf,iso9660 user,noauto 0 0
# /dev/sda2 /media/pluto vfat defaults,nls=utf8,umask=0000,gid=46 0 0
/dev/sda5 /media/sda5 swap defaults 0 0
...

It seems Edgy Eft needs the statements UUID. I'm studing the meaning of these instructions not present in Dapper. The strange is that /media/pippo (ntfs works well and /media/pluto (vfat) works only as a link to the sda2 directory.
When I try sudo mount -a the output is :
armonica@persik-desktop:~$ sudo mount -a
Password:
mount: wrong fs type, bad option, bad superblock on /dev/disk/by-uuid/1006-16B2,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
I'd like to know if I am doing a basic error in fstab setting for pluto.

Thanks in advance

Enrico_dvchp
;)

enrico_dvchp 07-12-2007 12:40 PM

Hi again.
I've tried more ways to make visible on the desktop myvfat partition but it's enough frustrating. I know the partition is mounted. This depends on this terminal output:
armonica@persik-desktop:~$ sudo mount /dev/sda2 /media/pluto
mount: /dev/sda2 already mounted or /media/pluto busy
mount: according to mtab, /dev/sda2 is already mounted on /media/pluto
I know the fat partition has some problem caused probably by Partition Magic, that once I had the bad idea to use. Maybe the best thing is to delete and make another fat32 partition. This is my last attempt on fstab to make my Edgy able to understand the fat32 partition as a volume not as a directory. Failed.
# /dev/sda2
UUID=1006-16B2 /media/pluto vfat defaults,utf8,umask=007,fmask=0111,dmask=0000,gid=46 0 0
...
Other suggestions?

Enrico_dvchp

saikee 07-12-2007 01:18 PM

When you say your partition invisible in /media/pluto what exactly do you mean?

Are you just complaining you cannot access its content because you have no permission to do so?

You can view its content in a terminal by command
Code:

sudo ls /media/pluto
Your fstab indicates the partition to be mounted for access by groups with gid=46. Unless you belong to that group or in root the content should be denied to you.

enrico_dvchp 07-12-2007 04:21 PM

Rebuilding Grub after Gfxboot
 
I can see now the content of my windows partitions then the main problem is solved. But even if the computer recognizes /media/pippo, and report it on the desktop not the same worths for /media/pluto (fat32). I know I can access pluto and pippo but I don't understand why pippo is displayed as a proper icon on the desktop and pluto can't do it. I can access it only in this way:
armonica@persik-desktop:/media/pluto$ cd /media/pluto
armonica@persik-desktop:/media/pluto$ ls /media/pluto
*.*
... or by using a file manager.

Can I create an automatic icon for my fat 32 partition?
Before reformatting it, I'd like to know if this bug can be solved by a fstab command I don't know.
Thanks a lot anyway. Sorry for my terrible english.

Bye, Enrico_dvchp

:newbie:

saikee 07-12-2007 05:17 PM

The correct way to find file is always by the file manager.

If you want to see the device sda2 icon in the desktop of user , say, armonica instead of /media/pluto just change
Code:

# /dev/sda2
UUID=1006-16B2 /media/pluto vfat defaults,nls=utf8,umask=0000,gid=46 0 0

to
Code:

# /dev/sda2
UUID=1006-16B2 /home/armonica/Desktop vfat defaults,nls=utf8,umask=0000,gid=46 0 0


enrico_dvchp 07-14-2007 01:45 PM

Solved!
 
I've saved my Fat32 partition and I've proceeded to fix the Partition Table Disk Doctor bug on it. I remember PTDD claimed Fat32 partition started at sector 16418430 even if its correct value was 184585185. Once rebooted, I've entered Ubuntu and used System>Adm.>Gnome Partition Editor.
I've deleted my old fat 32 partition and created another one.
Rebooted and followed the steps:
sudo mkdir /media/pluto
opened fstab to check sda2 settings:
UUID=1006-16B2 /media/pluto vfat defaults,utf8,umask=0000,fmask=0111,dmask=0000 0 0
Then: sudo mount -a
UUID=1006-16B2 /dev/sda2 not found.
So angrily, I've typed vol_id -v /dev/sda2
and the result is...
ID_FS_USAGE=filesystem
ID_FS_TYPE=vfat
ID_FS_VERSION=FAT32
ID_FS_UUID=4699-0A13
...
Finally, I've changed the UUID value in fstab and rebooted.
Now Ubuntu recognizes the id of Pippo and Pluto.
I ask myself... what was so wrong in the old-fashioned Dapper fstab way? That's true, personal values don't worth for all, but it is the beauty of Linux.
Anyway,
bye soon.
:)
Enrico_dvchp


All times are GMT -5. The time now is 10:43 PM.