Help - Search - Members - Calendar
Full Version: Weird/Faulty partitioning? No boot!
MandrivaUsers.org > General Help > Hardware
fopetesl
As a Newb, last year I installed Mandriva 2007. OK O/S quite like it. Multi boot with XP.
I ran out of Windoze disk space, (it's a 250GB SATA), so reduced the size of the ROOT partition and created a new Windoze drive G:

Now Mandriva won't boot, comes up with a fault on /dev/sda5 (the new NTFS partition), then throws me into a login prompt which will not accept anything.

What puzzles me is that Grub's menu still points to the correct partitions(?)

Disk partitions:
CODE
Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x25a5ad84

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         728     5847628+   b  W95 FAT32
/dev/sda2             729        5372    37302930    c  W95 FAT32 (LBA)
/dev/sda3            5374       30401   201037410    5  Extended
/dev/sda4            7260       11017    30186131+  83  Linux
/dev/sda5            5374        8283    23374543+   7  HPFS/NTFS
/dev/sda6            8284        8573     2329393+  82  Linux swap / Solaris
/dev/sda7           11018       24072   104864256   83  Linux
/dev/sda8           24073       30401    50837661    7  HPFS/NTFS
linux:/home/linux #


sda4 is ROOT
sda7 is HOME

Grub menu.lst:
CODE
timeout 1800
color black/cyan yellow/cyan
default 0

title linux
kernel (hd0,3)/boot/vmlinuz root=/dev/sda4  resume=/dev/sda6
initrd (hd0,3)/boot/initrd-ml2007-SATApatch.img

title failsafe
kernel (hd0,3)/boot/vmlinuz root=/dev/sda4  failsafe resume=/dev/sda6
initrd (hd0,3)/boot/initrd-ml2007-SATApatch.img

title windows
root (hd0,0)
makeactive
chainloader +1

title windows1
root (hd0,1)
makeactive
chainloader +1
I tried the repair from the x86_64 install CD(1) but it throws a wobbly saying it can't find ROOT partition.
How to dig out the problem?


[moved from Software by spinynorman]
viking777
QUOTE
Now Mandriva won't boot, comes up with a fault on /dev/sda5 (the new NTFS partition), then throws me into a login prompt which will not accept anything.


I think we are going to need some more information about this statement, partitcularly the login prompt that 'will not accept anything'. If you really have a login prompt then it should accept your username and password, if that isn't happening then what is? When you get to this unhelpful login prompt have you tried pressing CTL/ALT/F1 (or F2 etc) to open another login window?

What information do you have on the fault on /dev/sda5? Anything? Nothing?

From my own experience I have found that every time I mess around with partitions it always helps to reinstall grub afterwards. This might sound difficult, but it really isn't. There is nobody in the world more command line phobic than me and I can do it easily.

Of course that brings me back to my original question. If your login prompt really will not accept anything then you will not be able to easily alter grub, but we really need a bit more information.
scarecrow
I don't think the disk partition information is correct.
Since /dev/sda3 is an extended partition containing logical volumes, the first logical one would be /dev/sda5
Try again with a gparted liveCD, or something similar.

PS: Are you running XP on FAT32? Why? AFAIK the only good reasons to do that is if you like exhessive fragmentation, and believe that filesystem journaling is something not worth its modey.
viking777
QUOTE
Since /dev/sda3 is an extended partition containing logical volumes, the first logical one would be /dev/sda5


I don't want to hijack this guys thread scarecrow, but your statement there puzzles me. If /dev/sda3 is your extended partition then surely /dev/sda4 would be the first logical partition on it (which it is). Why should it be /dev/sda5? I'm not saying you are wrong or anything, I don't really know, just asking.

On my system /dev/sda4 is the extended and /dev/sda5 is the first logical partition which seems - well, logical - if you will excuse the pun!
scarecrow
Hi, viking777,
at least when using fdisk the first logical partition within an extended partition is always /dev/sda5
http://tldp.org/HOWTO/Partition/fdisk_partitioning.html
Checkout example 5.4
The extended partition is /dev/hda3 and /dev/hda4 is missing, and this is ALWAYS the case when you have less than three primary partitions (the extended partition can be only one).
/dev/hda4 is the largest numbering an extended partition can have, simply because if you already have four primary partitions then no further partitioning is possible... and while it can be anything lower, even /dev/hda1, the first logical partition within it will be /dev/hda5.
The listing on the first post can be valid only if /dev/sda4 is primary (I guess it was formerly mounted as /) - but the introduction of NTFS volume as /dev/sda5 has obviously made swap and the other linux partition (likely mounted as /home) unreachable to the system. To fix this, one has to touch /etc/fstab AND reactivate swap. I simply guessed the listing is wrong beacause it's strange paractice to create an extended partition and after that one add a primary one! (it is possible of course, but myself being dumb cannot find any good reason to do that).
fopetesl
QUOTE (viking777 @ Jul 26 2008, 05:10 PM) *
I think we are going to need some more information about this statement, partitcularly the login prompt that 'will not accept anything'. If you really have a login prompt then it should accept your username and password, if that isn't happening then what is? When you get to this unhelpful login prompt have you tried pressing CTL/ALT/F1 (or F2 etc) to open another login window?

What information do you have on the fault on /dev/sda5? Anything? Nothing?

From my own experience I have found that every time I mess around with partitions it always helps to reinstall grub afterwards. This might sound difficult, but it really isn't. There is nobody in the world more command line phobic than me and I can do it easily.

Of course that brings me back to my original question. If your login prompt really will not accept anything then you will not be able to easily alter grub, but we really need a bit more information.

Like I said the login prompt won't accept anything, root, user name, nada. And no alternative terminals either.

The error on /dev/sda5 goes through too fast for me to get but it's along the lines of bad block - (it's an age thing cry.gif )

I could alter grub, well menu.lst if that's what you mean coming in from XP. However I don't think that's what you actually mean since menu.lst seems to indicate the correct partitions?

I'm not at all sure there's any more information I can give you since I have no access to the system logs.

Maybe I should just reload from start since my HOME partition is still there?

Oh and why is XP on FAT32? When I loaded XP some time ago (mirror copied from a PATA drive) LINUX wasn't too happy about seeing NTFS partitions. I just haven't got around to converting it yet.
scarecrow
If your root ( / ) partition was /dev/sda4 you don't really have to reinstall grub: it's still there. But you do have to use a liveCD or whatever, mount /dev/sda4 and edit /etc/fstab. Now your swap is /dev/sda6 and /home is /dev/sda7. You can even reacivate swap now by chrooting to your root partition, and running "swapon /dev/sda6". But you could also try commenting the swap entry in fstab, and try booting your linux with no swap (if you have enough RAM there should be no issues). If you succeed, then you can uncomment the swap entry in fstab, opening a root console, mounting /dev/sda6 and running "swapon blah-blah" from your running system.
In any case, if when creating /dev/sda5 the data on the other logical partitions were moved properly you do NOT have to reinstall.
AFAIK you can use (for doing the above) any good linux liveCD, including the Mandriva liveCD, or even the normal Mandriva installation CD (I do know it's OK for reinstalling grub and chrooting to your installed system).
viking777
QUOTE (scarecrow @ Jul 27 2008, 01:26 PM) *
Hi, viking777,
at least when using fdisk the first logical partition within an extended partition is always /dev/sda5
http://tldp.org/HOWTO/Partition/fdisk_partitioning.html
Checkout example 5.4
...


Thanks for that scarecrow, I was aware of the 4 primary limitation, but I was not aware that meant that all logicals started with #5 even if you don't have the four primaries. Of course in my case it was just coincidence that my first logical partition happened to be #5 anyway.

fopetesl - aplogies for interfering in your thread. I hope you are able to sort out your problem with the information that scarecrow has given you.
fopetesl
Thanks scarecrow for your patience smile.gif
Since I have a mirror copy of my HDD I went a little further and installed Mandriva v 2008 Spring.
(Mandiva 2007 would never correctly recognise my Attansic 10/100/1000 Ethernet card)

Went without a hitch until I tried to load XP and got the usual "NTLDR Missing".
Fixed that to get here now I need to check Mandriva still boots OK.

Then it's on to downloading the x86_64 version 2thumbsup.gif
fopetesl
Well, it's getting there but not yet :(
Installed x86_64 with no hitches and booted into Mandriva several times OK.

However, when I try to boot into Windows XP I get the following message:
CODE
Error 8: Kernel must be loaded before booting


Looked at Grub help and it says pretty much the same thing but not why

Any tips here to dig it out?

BTW, I got i586 version to boot into Windows OK by editing
CODE
root (hd0,1)
makeactive
chainloader +1
to
CODE
root (hd0,0)
makeactive
chainloader +1

Didn't work this time wall.gif
scarecrow
Try reinstalling grub:
CODE
grub-install /dev/sda

under a root console.
The correct entry for your XP should be the second one.
Once, due to a bios bug I had to use a different menu.lst entry (actually it's my current laptop device):

CODE
rootnoverify (hd0,0)
makeactive
chainloader +1
fopetesl
QUOTE (scarecrow @ Jul 28 2008, 08:50 PM) *
Try reinstalling grub:

OK is fixed! smile.gif
My fault - typo in menu.lst.
The screen was pulled slightly to the left when I edited menu.lst so I inadvertently altered
CODE
root (hd0,1)
to
boot (hd0,0)
oops.gif DUH!!

However, one question. I first followed your suggestion
CODE
grub-install /dev/sda
end-request: I/O error, dev fd0, sector 0
end-request: I/O error, dev fd0, sector 0
end-request: I/O error, dev fd0, sector 0
end-request: I/O error, dev fd0, sector 0
end-request: I/O error, dev fd0, sector 0
end-request: I/O error, dev fd0, sector 0

.. installation succeeded

Why the trial accesses to the floppy? huh.gif

How did you discover rootnoverify was the answer to your problem?
You have an NTFS partition?

I only ask because I have it in mind to convert all my FAT32 partitions to NTFS and would like to be confident I'm not going to break something else if I do computer.gif

Oh and a vote of thanks for your input guys 2thumbsup.gif
scarecrow
It seems that you do have a floppy line in your fstab, do you?
Yes, I do have two NTFS partitions.
To convert your FAT32 partitions to NTFS within windows, open a (windows) console, and
CONVERT C: /FS:NTFS
However, in most cases I wouldn't advise you to follow this solution, as you would likely end up with 512 bytes clustersize, which is very negative, performance-wise. More info here
Unfortunately, all others that would allow you converting to the regular (4K) clustersize ain't free.
fopetesl
QUOTE (scarecrow @ Jul 30 2008, 04:52 AM) *
To convert your FAT32 partitions to NTFS within windows, open a (windows) console, and
CONVERT C: /FS:NTFS
However, in most cases I wouldn't advise you to follow this solution, as you would likely end up with 512 bytes clustersize, which is very negative, performance-wise. More info here
Unfortunately, all others that would allow you converting to the regular (4K) clustersize ain't free.
Thanks for that. Nice tip.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.