LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-19-2004, 05:20 AM   #1
stairynight
LQ Newbie
 
Registered: Aug 2004
Posts: 9

Rep: Reputation: 0
Linux does not boot after partition resizing


Hi,
On my old hard disk I had 3 windows partition (WinME, WinXP, and a data partition), and 3 linux SUSE partition (boot, swap, and main linux partition). Everything worked fine and I could boot linux via a LILO diskette.

I then bought a larger hard-disk. I transfered on it images of all the partitions. I also resized the partitions, and I laso actually deleted one windows partition. Now all the windows stuff boots fine. But I cannot boot anymore linux via the LILO diskette: I get the message "LI".

Is there an easy solution to this problem (other than reinstalling SUSE)???

Thanks for help
 
Old 08-19-2004, 05:32 AM   #2
Frustin
Member
 
Registered: May 2002
Location: Essex, UK
Distribution: Debian, Redhat, AIX 5L
Posts: 512

Rep: Reputation: 30
have you put both of the disks back in the case? did you load the new disk with lilo on the MBR? what lilo.conf did you use?

dont forget you can use your distributions cd as a rescue disk to mount your HDD again to reinstal lilo.
 
Old 08-19-2004, 05:48 AM   #3
stairynight
LQ Newbie
 
Registered: Aug 2004
Posts: 9

Original Poster
Rep: Reputation: 0
Sorry my ignorance!! Anyway, I try to answer your questions

The new hard-disk in properly mounted in the case (in the computer I have only this new hard-disk. It is a laptop)

"Did you load the new disk with lilo on the MBR?" Sorry, but I do not understand the question. What is an MBR? When I boot with the SUSE installation CD-1 and I go in "start rescue system" I do not find any lilo.conf in /etc. Where should I find lilo.conf?

Yes, I tried the rescue system. But how can I mount my HDD again to reinstall LILO?
 
Old 08-19-2004, 05:56 AM   #4
Frustin
Member
 
Registered: May 2002
Location: Essex, UK
Distribution: Debian, Redhat, AIX 5L
Posts: 512

Rep: Reputation: 30
presuming that you have your hdd plugged into ide1 as the primary disk, at the command line type:

# mount /dev/hda1 /mnt
# cd /mnt/etc/
# vi lilo.conf

thats your lilo.conf that is on your disk. Print it here please.

The MBR is the master boot record, its the first, i think, 1k of the disk and tells the disk where to find the operating system.
 
Old 08-19-2004, 06:14 AM   #5
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
hi
to get it simple
boot into rescue mode

#chroot /mnt/sysimage

will mount ur installed linux system

#lilo

will install lilo

and i hope u r done

regards
gaurav
 
Old 08-19-2004, 06:22 AM   #6
stairynight
LQ Newbie
 
Registered: Aug 2004
Posts: 9

Original Poster
Rep: Reputation: 0
What I did is the following:

# mount /dev/hda8 /mnt
# cd /mnt/etc/

Then I edited /mnt/etc/lilo.conf and set boot to hda6 and root to hda8 (they were set wrongly!). I checked and hda6 and hda8 look like my root and boot partitions, not hda1.

Now, how do I go on with LILO?

Thanks a lot
 
Old 08-19-2004, 06:38 AM   #7
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
hey
did u try out the rescue metthod i mentioned in my previos method

regards
gaurav
 
Old 08-19-2004, 08:26 AM   #8
stairynight
LQ Newbie
 
Registered: Aug 2004
Posts: 9

Original Poster
Rep: Reputation: 0
Hallo Gaurav,
yes, I did the following:

start the rescue system
mount /dev/hda8 (the root partiotion) under /mnt
edit and correct the /mnt/etc/lilo.conf
mount /dev/hda6 (the boot partition) in /mnt_tmp
copy the content of /mnt_tmp in /mnt/boot
did chroot /mnt
run the command "lilo"

And then? How can I boot again from my old lilo diskette?

Thanks
 
Old 08-19-2004, 10:07 AM   #9
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
hi there

#chroot /mnt/sysimage

u may try
#chroot /dev/hda8

allows you to change ur present environment to the environment of ur installed linux system so then u can run lilo which will write the lilo on your MBR ,so u do not need ur lilo boot floppies.

any specific reasons for i want to still use floppies to boot ur lilo

also when u run lilo it givs out output as

added linux
added windows*


do u get somewhat like output as above
then u may boot from ur hard disk

regards

gaurav
 
Old 08-19-2004, 10:24 AM   #10
stairynight
LQ Newbie
 
Registered: Aug 2004
Posts: 9

Original Poster
Rep: Reputation: 0
I start the rescue system with the SUSE CD-1. I do all the mounting of hda8, chroot, lilo and I finally get to the point where I obtain something like

added linux
added windows*
...

What do I have to do after? If I just reboot (without any boot cd or diskette inserted) I only get windows. I am not prompted to start linux.

Indeed I would like to get rid of the floppy to start linux

Thanx
 
Old 08-19-2004, 10:48 AM   #11
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
hi
post ur lilo.conf here ...fast
i assume ur linux root partiton is hda8
and tell me that u do not get any error after running the command lilo

regards
gaurav
 
Old 08-19-2004, 11:11 AM   #12
stairynight
LQ Newbie
 
Registered: Aug 2004
Posts: 9

Original Poster
Rep: Reputation: 0
Root partition is hda8 and boot partition is hda6. On the primary partition I have WindowsME. Enclosed in an extended partition I have WindowsXP and then Linux with its 3 partitions. Via a boot.ini file in the primary partition I can choose between WinME and WinXP. But I never get the chance to choose linux (unless I start with the LILO diskette inserted). When starting with the LILO diskette inserted, I used to get the choice Linux/Windows, but after the partition resize I only get the message "LI"

I read that when starting lilo from the hard-disk, the boot partition cannot be after the first 8 GB. Mine it is definitely after that limit. If this is true, I would be happy also just by starting Linux form the LILO diskette. I prefer not to move partitions at the moment.

I guess I must be close to the solution...

Here my lilo.conf file:

boot = /dev/hda6
vga = 771
read-only
menu-scheme = Wg:kw:Wg:Wg
lba32
prompt
timeout + 80
message = /boot/message

image = /boot/vmlinuz
label = linuz
root = /dev/hda8

image = /boot/vmlinuz.suse
label = suse
root = /dev/hda8
optional

other = /dev/hda2
label = windows

image = /boot/memtest.bin
label = memtest86
 
Old 08-19-2004, 11:40 AM   #13
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
hi there

the setup u r using is where
the lilo is installed not on the MBR but on /dev/hda6
so u need ur windows MBR to point to lilo
what i do is
i have a boot partiton on on my root i do not have a boot partiton
so in u case u have to option to make a boot diskette
have aloook here

http://home.att.net/~lilo-boot/fdmake.htm


================OR===================

in the rescue mode

after u
copy the content of /mnt_tmp in /mnt/boot

use this lilo.conf

boot = /dev/hda
vga = 771
read-only
menu-scheme = Wg:kw:Wg:Wg
lba32
prompt
timeout + 80
message = /boot/message

image = /boot/vmlinuz
label = linuz
root = /dev/hda8

image = /boot/vmlinuz.suse
label = suse
root = /dev/hda8
optional

other = /dev/hda2
label = windows

image = /boot/memtest.bin
label = memtest86
====================================================
i have changed the boot = /dev/hda6 to /dev/hda to instaruct the lilo to insrtall on the MBR

hope this works

if in case lilo gets u nowhere i.e u are stuck somewhere

to get back to windows

boot from a win98 cd
at the command prompt
#fdisk /mbr
will remve lilo and rewrite the windows MBR to it

regards
gaurav
 
Old 08-19-2004, 12:20 PM   #14
stairynight
LQ Newbie
 
Registered: Aug 2004
Posts: 9

Original Poster
Rep: Reputation: 0
I tried both of your solutions they look almost like working, in the sense that the linux loader now starts properly. But when I choose to start linux from the menu, in the "starting" shell (after quite some lines) appears
Checking file systems...
fsck.ext2: Bad magic number in super-block when trying to open /dev/sda5
The superblock could not be read or does not describe a correct ext2 filesystem
...
...

At this point I am prompted to login as root for the maintenance mode.

What should I do now???

Thanks for help!
 
Old 08-19-2004, 12:29 PM   #15
stairynight
LQ Newbie
 
Registered: Aug 2004
Posts: 9

Original Poster
Rep: Reputation: 0
Another thing:

/dev/hda5 is now a NTFS partition where WinXP is installed. Why does linux get stuck with this partition? Is it because maybe before the partition rearrangement /dev/hda5 was something else? (For example, a linux partition)?

Is there a "memory" of the old partition arrangement? How can I change this?

Thanx
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Resizing Linux Partition browser Linux - General 12 09-01-2005 01:47 PM
Problem Resizing Linux Partition From Partition magic John_Emad SUSE / openSUSE 5 02-16-2005 01:42 PM
Partition resizing for Linux LavaDevil94 Linux - Software 5 11-14-2004 11:01 PM
resizing a partition in linux Snerkel Linux - Software 5 10-05-2004 05:42 PM
resizing the linux partition tzvik Linux - Software 2 04-30-2003 06:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:21 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