LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-11-2004, 12:57 PM   #1
dave37
Member
 
Registered: Sep 2003
Location: Ottawa, Canada
Distribution: Ubuntu Dapper
Posts: 70

Rep: Reputation: 16
unable to boot after partitionmagic 7


I did something stupid, I was rearranging the partitions on my machine using partitionmagic 7. All went well until I changed some empty space next to the linux boot partition to ext2 (hoping to use it for increased space).

I'm running xp as well, and had been sucessfully dual booting with grub in the graphical interface. Now when I boot up the machine I just get a grub> text prompt. I've tried a linux boot disk and get a kernel panic, no initd. If I try to upgrade using the linux installation cd's, I get an error that the swap space is not activated. I converted the space next to the linux boot partition back to free space using the partitionmagic boot disks to no avail.

I used expee recovery console fixmbr and could then access my win installation. Is there a way to install the grub boot loader to recognize the linux partitions?


Help!

Last edited by dave37; 01-11-2004 at 03:08 PM.
 
Old 01-11-2004, 04:30 PM   #2
watashiwaotaku7
Member
 
Registered: Oct 2002
Location: wisconsin -- The Badger state
Distribution: gentoo
Posts: 654

Rep: Reputation: 30
you need to download a rescue cd or livecd (gentoo or slackware) and chroot into your partition to change your grub.conf and /etc/fstab to match your new partition scheme, my guess is that by changing that free space you changed the partition number for your swap space and root partition, if you need more detailed directions then please respond in such a manner
 
Old 01-12-2004, 06:32 AM   #3
dave37
Member
 
Registered: Sep 2003
Location: Ottawa, Canada
Distribution: Ubuntu Dapper
Posts: 70

Original Poster
Rep: Reputation: 16
I believe you're right, as when I use the redhat cd's to do an "upgrade" in order to try and reinstall grub it detects an install on hda10, and there wasn't an hda10 before, but fails to proceed due to "error, swap space not activated".

Can you provide precise instructions for the chroot method please? I can see my linux partitions through partitionmagic within windows if that is any help.

Thank you

Last edited by dave37; 01-12-2004 at 08:45 AM.
 
Old 01-12-2004, 06:48 PM   #4
dave37
Member
 
Registered: Sep 2003
Location: Ottawa, Canada
Distribution: Ubuntu Dapper
Posts: 70

Original Poster
Rep: Reputation: 16
Ok, using a redhat boot floppy and the command linux root=/dev/hda10 and it boots to linux!!!

Now, how can I get grub reloaded, since the redhat install cd hangs with the swap file not activated error before getting to the grub install. From within graphical linux as root, in a terminal I entered /sbin/grub-install /dev/hda and it reported back hda(0) and fd(0) as being in the map. However when I reboot up comes expee again, no sign of grub.

Also, so as not to go through this again, can one changed the size of ext3 partitions using qparted or other linux tools without rendering the system unbootable?

below is my grub.conf from /boot/grub/grub.conf

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,7)
# kernel /vmlinuz-version ro root=/dev/hda9
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,7)/grub/splash.xpm.gz
password --md5 $1$/2c1saye$YokbVEgmh7aSaoMlHdksZ1
title Red Hat Linux (2.4.20-27.9)
root (hd0,7)
kernel /vmlinuz-2.4.20-27.9 ro root=LABEL=/ hdd=ide-scsi
initrd /initrd-2.4.20-27.9.img
#title Red Hat Linux (2.4.20-24.9)
# root (hd0,7)
# kernel /vmlinuz-2.4.20-24.9 ro root=LABEL=/ hdd=ide-scsi
# initrd /initrd-2.4.20-24.9.img
#title Red Hat Linux (2.4.20-20.9)
# root (hd0,7)
# kernel /vmlinuz-2.4.20-20.9 ro root=LABEL=/ hdd=ide-scsi
# initrd /initrd-2.4.20-20.9.img
#title Red Hat Linux (2.4.20-8)
# root (hd0,7)
# kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdd=ide-scsi
# initrd /initrd-2.4.20-8.img
title Windows XP Home Edition
rootnoverify (hd0,1)
chainloader +1



Last edited by dave37; 01-12-2004 at 07:50 PM.
 
Old 01-13-2004, 10:20 PM   #5
watashiwaotaku7
Member
 
Registered: Oct 2002
Location: wisconsin -- The Badger state
Distribution: gentoo
Posts: 654

Rep: Reputation: 30
to use chroot mount your root partition, once moutned type chroot /bin/bash /where/you/mounted/it from here, it is almost exactly as if you were booted directly into that installation, except you will have no X so only command line stuff, from there you can change your grub.conf although you can change that simply but getting to a command line and editing it from there, the other problem you have is editing your /etc/fstab open this in an editor and change where your swap space is, if you dont know use cfdisk to tell you how your hdd has been laid out or add 1 to the number since that should be how far it got moved, my only concern is that i dont know how grub initializes changes from the .conf if it is something that is part of the shutdown scripts then you have a problem and will need to re-install grub, if not, and it reads the grub.conf at boot then you should have no need and come to think of it no need for chroot at all (though its a wonderful and nifty utility)
 
Old 01-14-2004, 06:48 AM   #6
dave37
Member
 
Registered: Sep 2003
Location: Ottawa, Canada
Distribution: Ubuntu Dapper
Posts: 70

Original Poster
Rep: Reputation: 16
I couldn't quite figure out how to reinstall grub, so i went the XP ntldr method (using the XP boot menu and a "bootsect.lin" file to boot linux. I edited the grub.conf and the etc/fstab like you said, worked like a charm. Thanks ever so much.

Now back to what caused all of this, the layout of my hdd from left to right is primary partion (xp), extended partition containing: 3 fat32 partitions followed by linux boot ext3, linux root ext3 and linux swap ext3. I'd like to convert the 3rd fat32 drive to ext3 and somehow merge it with my linux root drive in order to create a larger drive, do you know if this is possible?
Using partitionmagic and qpart I am not able to move around/merge the linux ext3 partitions.

Again, thanks very much for your help!

 
Old 01-14-2004, 10:16 PM   #7
watashiwaotaku7
Member
 
Registered: Oct 2002
Location: wisconsin -- The Badger state
Distribution: gentoo
Posts: 654

Rep: Reputation: 30
im not sure if its possible, i think it is on ext2/3 but im not sure, i am sure that its not possible on reiserfs BUT if you have some extra disk space i ahve a wonderful way to do it, use the command prompt from the redhat cd or whatever cd you and do the following

mount your linux partition

cd into its top directory

then

tar -cvjpf full.tar.bz2

this will create a compressed image of your linux partition between 25 and 50% smaller this you can then move to somewhere else and go ahead and change that partition without any consideration for its data when your done then you can put it all back by cd-ing into the top level directory and typing

tar -xvjpf full.tar.bz2

make sure then to change your etc/fstab and boot loader, also, have you tried lilo? i happen to like it very much, also as long as you might be changing a lot on your disk you might try reiserfs, i happen to love it, it is much faster than ext2/3
 
Old 01-15-2004, 05:46 AM   #8
Nukem
Member
 
Registered: May 2003
Location: Canada, TO.
Distribution: Slackware: in progress, Mandrake 9.2, Libranet, Vector
Posts: 373

Rep: Reputation: 30
Being a linux nubie, I'm not sure about the problem you having. But I have one advice. Don't ever play with partition magic. Don't ever expect that it can do everything that it says it can. I also have a bad experience with partitionmagic 8.0 .
First I created a second partition on my drive to see how partition magic works. It was nice. It created another parition without affecting any data. But I didn't want to keep it. It was a test. So now I wanted to merge partitions, cauz I only had very few space left in my "C". So I did exactly what it told me and restarted the computer. Then I got to usual place where it does the job in DOS.
It sowed me everything was successful and 100% complete. My new disk space is bla bla bla. This many partition on the drive and etc. etc.
But then I booted windows and it was a totally different story. My partition was still there. It never merged it. And as usual, I get these messages saying I'm out of disk space in "C". Well, I repeated partitionmagic steps again and again. Each time it says everything is successfully done. I only have one partition on drive and I have one drive, my new disk spaces is this bla, bla, bla. But each time when I booted windows it was that same old story. Partitionmagic had done "0" work each time. So I ended up erasing my whole hard drive and recovering lost data for the next few weeks.

So this is my advice. Don't ever play with partition magic. Don't ever expect that it can do everything that it says it can, because it can't. Just like all the other windows programs, it fails for no reason. It can't do everything it says it can perfectly.

Last edited by Nukem; 01-15-2004 at 05:48 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Uninstalling RedHat Linux 9.0 Using PartitionMagic asilentmurmur Red Hat 9 03-03-2005 01:12 AM
Linux won't boot after playing with PartitionMagic bichenoubi Linux - Newbie 14 01-25-2005 10:46 PM
lose partitionmagic noel General 2 08-12-2004 06:58 PM
Windows won't boot after partitionmagic Ulrik_Uppkastar Linux - Newbie 4 12-20-2003 06:46 PM
Keep clear of PartitionMagic if you like linux browny_amiga Linux - Software 9 09-22-2003 08:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration