Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
12-22-2005, 06:51 AM
|
#1
|
LQ Newbie
Registered: Dec 2005
Posts: 4
Rep:
|
Resized Linux Partition on Dual Boot - Lost Boot
SuSE 7.1
Win98
Dual Boot
I have a dual boot system on one drive. The system has been running fine for quite some time. Resized the Linux partition to a smaller size, using Partition Magic, and now I have lost the boot loader. (It is still there - just not loading.)
I need to know what the best and safest way is to fix this problem without taking the risk of messing up Windows. It is okay if I have to reload Linux, as I can do a clean install without losing anything valuable.
|
|
|
12-22-2005, 07:11 AM
|
#2
|
LQ Newbie
Registered: Jan 2005
Posts: 19
Rep:
|
What bootloader are you running? lilo or grub. How are you presently accessing the system? You should be able to reinstall lilo or grub from a recovery cd.
|
|
|
12-22-2005, 01:02 PM
|
#3
|
Member
Registered: Jul 2004
Location: New Jersey, US
Distribution: Red Hat Linux WS version 3
Posts: 126
Rep:
|
Thanks for posting this as I was just about to repartition a Linux box using Partition Magic to make it a dual boot with XP. Careful with GRUB, because it is very buggy for dual-boots. A lot of people will tell you it is fine, but it's my opinion and experience (and the experience of many others after a quick Google search)that it is not good for dual-boots. I had another dual-boot RH/XP system that booted to an OS only when it wanted to. I reinstalled GRUB, which did not correct this. However, once I was able to get into the RH OS I made a floppy disk for booting up Linux and replaced GRUB on the hard disk with the Windows MBR.
|
|
|
12-23-2005, 02:50 AM
|
#4
|
LQ Newbie
Registered: Dec 2005
Posts: 4
Original Poster
Rep:
|
Answer to Response
jbetten:
I'm using LILO.
Currently, I'm not accessing the system at all.
I did boot with a floppy to make sure my partitions were intact. Everything seems to be okay there.
OperatOr:
When I first set up the dual boot, I think I messed something up and started over (probably just an error on my part - it's been a while, so I don't remember). Other than that, the setup was quite easy and flawless afterwards. I have had this setup on this computer for 4 years.
|
|
|
12-23-2005, 09:02 AM
|
#5
|
Senior Member
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,158
Rep:
|
Quote:
Originally Posted by 0perat0r
Careful with GRUB, because it is very buggy for dual-boots. A lot of people will tell you it is fine, but it's my opinion and experience (and the experience of many others after a quick Google search)that it is not good for dual-boots.
|
That is a very drastic statement. I don't think grub is very buggy. If it were, not many of them would be using it and not almost all distros would support it. It just so happens that bootloaders are tricky piece of software and requires good deal to understanding before you mess with them.
Also to add that if you are not comfortable with it, Linux installers always give you the option to use boot floppies. Read the grub manual and see the functionality if offers. For a piece of software like that, there would be complexities and learning curve. I have often seen that most errors are caused by wrong configuration because grub uses a different device naming conventions than most people are familiar with. I am not a grub expert but I have always been able to figure out changes with my grub and as far as possible, I leave it alone once configured.
One trick that I have always used is that I'll always install grub from my primary distro (that I use 90% of the time) and then just add grub entries for newer distro as I add them to my machine. This way even if you mess up your entries, you can still boot your primary distro and trouble-shoot the newly installed ones. Since the start of my Linux use, I always made partitions before hand with the initial install. This way I can easily add distro later on without changing the disc geometry (as messing up grub). I have figured, I like to use at least three other distro, so I create partitions for primary and future distros.
One other thing that I always do it that i keep a paper copy of my working grub config file. This way, I can always refer to it in case of problems.
Here's a tutorial I've written to install grub from source and configure/install it. It is does not cover all aspects of grub but it is complete for my use. Hope it helps.
-Tux,
|
|
|
12-23-2005, 11:46 AM
|
#6
|
Member
Registered: Nov 2005
Location: Oregon
Distribution: Ubuntu
Posts: 64
Rep:
|
What exactly do you get on the screen when you try to boot? It could help to know, Do you get "lilo" or just "li" do you get a full prompt? I suspect that in resizing your partition lilo is now failing to find the kernel so fails to boot. It should be repairable, by booting a rescue disk, mounting the "/" partition, and use "chroot" to set the mount point for your root partition. Then check that your lilo.conf file is correct and re-run lilo. Example:
Code:
mount /dev/hda2 /mnt/root
cd /mnt/root
chroot /mnt/root
less /etc/lilo.conf
/sbin/lilo -v
exit
cd /; umount /mnt/root
I don't know what your partition arrangement is, what your lilo.conf file contains, the above example is just to give you the idea of how you might fix this. From personal experience, grub is a more powerful bootloader, and you likely could have still booted your linux system from the grub command line if that was your bootloader, just my for grub. Hope this can help, not one of the easier challenges to take on.
-G.
|
|
|
12-23-2005, 04:24 PM
|
#7
|
Member
Registered: Nov 2004
Location: Leiden, Netherlands
Distribution: SuSE; Fedora;Slackware
Posts: 58
Rep:
|
As far as I know Partition Magic cannot resize a Linux partition, at least not correctly. When I tried to do that once with Terabyte's BootITNG and a ReiserFS partition, BootIT had the grace to tell me beforehand that I had to reseize the Linux drive internally with its own ReiserFS tool first (ext2fs and ext3fs have their own special tools BTW) and only then use BootIT. Restoring Grub or Lilo probably will not help, because the Linux FS has to be reorganised completely. I.e., even if you manage to reinstall Grub/Lilo and boot Linux, the boot proces will hang a bit "further down the road".
|
|
|
12-23-2005, 05:15 PM
|
#8
|
Member
Registered: Jan 2004
Location: British Columbia
Distribution: Slackware64-current, aarch64
Posts: 231
Rep:
|
Quote:
Originally Posted by bibh_lnxq
As far as I know Partition Magic cannot resize a Linux partition, at least not correctly.
|
I use Partition Magic to resize ext2fs & ext3fs partitions on my linux boxen often, with no difficulties whatsoever. Can't speak for reiserfs though, never use it.
|
|
|
12-23-2005, 05:41 PM
|
#9
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,252
|
Resizing a partition (smaller) would generally mean resizing the filesystem first. PM hides all the gory details from you.
As for Pm messing the partition, I think that unlikely. If it is a recent version and recognised the filesystem type, I would expect it to work just fine. Been years since I tried it though.
If any of the loader code got moved in the resizing, you would have an issue. Lilo is particularly sensitive to location - it's why you need to keep running the lilo command every time you update the conf.
I have a feeling that Grub only needs to know the (sector) offset to the start of the partition - if that doesn't change you should be o.k.
Another reason (and there are plenty) that grub is a better option.
To the question;
- yes you can re-install the loader without affecting Linux; or Win98. However that Suse is pretty old, so I don't know how. Generally you would just boot the install CD, and get into recovery mode, and do it from there.
Try it, and see if you get an option to restore the boot-loader.
Another option is to use Knoppix to do the same thing. Would be a much newer version of the loader, but that shouldn't matter. See the post from Gsidious.
|
|
|
12-23-2005, 05:49 PM
|
#10
|
Member
Registered: Nov 2005
Location: US East Coast
Distribution: Fedora Core 6 and several LiveCDs
Posts: 34
Rep:
|
I thought it was better posting something here than starting a new thread.
I aborted an Ubuntu installation (since I couldn't figure out which partition to assign each thing to, i.e. ext 3, swap etc) and I ended up completely losing my lilo mandriva/windows xp pro bootloader (i'm running an ibm r52 thinkpad). The reason I was installing ubuntu on top of it was because mandriva wouldn't load itself properly.
Now, whenever I boot my thinkpad, all I get are a bunch of "9"s across a black screen.
I'm running Ubuntu live as we speak (thank God for live Cds!)
I just want to know, how can I either regain a bootloader, or better yet, how can I erase the linux partitions, remerge them with my winxp pro ntfs one, and get back the default mbr.
I've been doing some googling around for this, but my problem is that windows came preloaded on my thinkpad and I don't really have any set up cds or for that matter a floppy drive to run that fdisk/mbr thing they talk about.
It's not that I'm giving up on Linux, (I have SUSE 10.0 installed on my older PC), I just wanted to give it a try on my thinkpad (several distros) but screwed up beyond control.
Thanks.
|
|
|
12-23-2005, 06:13 PM
|
#11
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,252
|
Quote:
Originally Posted by blink56k
I've been doing some googling around for this, but my problem is that windows came preloaded on my thinkpad and I don't really have any set up cds or for that matter a floppy drive to run that fdisk/mbr thing they talk about.
|
I don't believe it needs to be *your* (registered) CD. Go get a mates XP CD, and boot that, go to recovery console, and run fixmbr - it's the new (documented) successor to "fdisk /mbr".
As for the partitions, XP will gag when it sees them, and offer to format them for you; let it. As for merging them, that's your can of worms - maybe go buy PM.
|
|
|
12-24-2005, 01:38 AM
|
#12
|
Member
Registered: Nov 2005
Location: US East Coast
Distribution: Fedora Core 6 and several LiveCDs
Posts: 34
Rep:
|
Thanks...I reinstalled Ubuntu and the Grub bootloader works just fine.
I'll keep the XP CD thing in mindshould I ever wipe out Linux from this system (hard to find someone that has one...can a bootlegged one be burned without getting me in trouble since I own/"own" an authentic version and I'm only using that fixmbr thing anyway?)
And yes I do have PM so it should be no prob.
Thanks again.
|
|
|
12-24-2005, 09:21 PM
|
#13
|
LQ Newbie
Registered: Dec 2005
Posts: 4
Original Poster
Rep:
|
Fixing the Resized Partition Problem
Quote:
Originally Posted by Gsidious
What exactly do you get on the screen when you try to boot? It could help to know, Do you get "lilo" or just "li" do you get a full prompt? I suspect that in resizing your partition lilo is now failing to find the kernel so fails to boot. It should be repairable, by booting a rescue disk, mounting the "/" partition, and use "chroot" to set the mount point for your root partition. Then check that your lilo.conf file is correct and re-run lilo.
|
I get "LI", but it is not a full prompt - just LI and a cursor blinking into infinity.
I don't have a rescue disk, but I do have a bootable install disk that might work. It will be a couple of days before I can mess with this, but I will reply on the outcome.
-- R. Rabbit
|
|
|
12-27-2005, 04:01 PM
|
#14
|
Member
Registered: Nov 2005
Location: Oregon
Distribution: Ubuntu
Posts: 64
Rep:
|
You can find an explaination of the Lilo error codes here:
http://www.tldp.org/HOWTO/Bootdisk-HOWTO/a1483.html
That probably won't be of much help though, basically you are going to need some kind of rescue boot disk/CD to recover the install. A Knoppix CD can be your best friend for something like this.
|
|
|
12-29-2005, 01:02 AM
|
#15
|
LQ Newbie
Registered: Dec 2005
Posts: 4
Original Poster
Rep:
|
Reinstall
Even though I've had Linux on this machine for awhile, I haven't found the time to mess with it too much. Also, I seem to have forgotten the root password.
I've decided to reinstall Linux.
Been so long since I first installed, I'll have to read up on installing on the Linux Partitions. Any tips would be appreciated.
One thing I might mention here, as, in searching forums, I found several people with the same problem who say they can't boot up to their Windows partition either. If someone reading this is having that problem, remember that when you set up the Lilo boot, you set the boot partition as the active partition. You will need to change the active partition to the Windows OS, and you should be able to boot to Windows.
|
|
|
All times are GMT -5. The time now is 01:44 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|