LinuxQuestions.org
Review your favorite Linux distribution.
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-31-2004, 07:25 AM   #1
shirishs
LQ Newbie
 
Registered: Jan 2004
Location: Zurich
Distribution: mandrake
Posts: 10

Rep: Reputation: 0
Unhappy changing partitions causes problems in booting in linux


Hi,
I have recently installed linux mandrake 9.1 on my windows XP laptop.It has dual boot with GRUB and everything was working fine till I decided to change the partitions.

My original HD layout information:

Filesystem Size Used Avail Use% Mounted on
/dev/hda6 2.7G 1.5G 1.0G 60% /
/dev/hda8 1.8G 303M 1.5G 18% /home
/dev/hda2 9.9G 9.1G 826M 92% /mnt/win_c
/dev/hda5 14G 5.5G 7.8G 42% /mnt/win_d

there was another FAT partition which was probably /dev/hda1(the loader from DEll which gives the initial splash screen and runs dell utilities at boot time.)

My change:
I was not able to write to my Windows partition(NTFS) from linux so decided to create a FAT32 partition so that my shared data can be kept on this partition.I resized my second windows partition(D drive:/dev/hda5) using Partition magic 8.0 to make a 1 GB fat32 partition,after this partition.And rebooted in windows and tested that the new partition was working fine by copying some files on the new partition(E.
But when I rebooted and tried to boot in linux, i got following error.


Mounting root filesystem
VFS: Can't find ext3 filesystem on dev ide0(3,6).
mount: error 22 mounting ext 3
pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed:2
Kernel panic: No init found. Try passing init= option to kernel

I know from the above message that the additional partition i have created has changed the nomenclature of partitions on harddisk.So when linux tried to mount partitions from /etc/fstab, it can not load the root as the partitions have changed.But my knowledge about partitions is just enough to resize partitions :-((.So I want to be sure if that is the problem and how should i fix it?I don't want to complicate the matters.

I have thought of this.
Boot in Linux using the mandrake 9.1 bootable cd and go into rescue mode.And somehow change the fstab to point to the new partition.


Following is the current partition info i got from partition magic:
==================================================================================================== =======
Partition Information for Disk 1: 28,615.8 Megabytes
Volume PartType Status Size MB PartSect # StartSect TotalSects
==================================================================================================== =======
*ellUtility Dell Pri 31.3 0 0 63 64,197
C: NTFS Pri,Boot 10,048.5 0 1 64,260 20,579,265
ExtendedX Pri 18,535.9 0 3 20,643,525 37,961,595
EPBR Log 12,519.4 None -- 20,643,525 25,639,740
D: NTFS Log 12,519.4 20,643,525 0 20,643,588 25,639,677
EPBR Log 1,004.1 20,643,525 1 46,283,265 2,056,320
E:IMP_DATA FAT32 Log 1,004.0 46,283,265 0 46,283,328 2,056,257
EPBR Log 2,737.6 46,283,265 1 48,339,585 5,606,685
Linux Ext3 Log 2,737.6 48,339,585 0 48,339,648 5,606,622
EPBR Log 494.2 48,339,585 1 53,946,270 1,012,095
*:SWAPSPACE2 Linux Swap Log 494.2 53,946,270 0 53,946,333 1,012,032
EPBR Log 1,780.6 53,946,270 1 54,958,365 3,646,755
Linux Ext3 Log 1,780.6 54,958,365 0 54,958,428 3,646,692



Can any one guide me if this is right thing to do?

regards,
Shirish.


(Dell inspiron2600 with 650 MB SD RAM)
 
Old 01-31-2004, 08:09 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
You are correct that since you have added a partition the bootloader is no longer able to find your linux partitions.

From looking at the output of PM.
/dev/hda1 Dell's restore partition
/dev/hda2 Windows C drive
/dev/hda3 Extended partition
/dev/hda5 Windows D drive
/dev/hda6 Windows E drive (your new FAT32 partition)
/dev/hda7 / (based on your info)
/dev/hda8 swap
/dev/hda9 /home (based on your info)

You need to boot to rescue mode and then check the output of fdisk to confirm:
fdisk -l /dev/hda (that is a small l)

Rescue mode should mount your partitions or a least try to. Its been awhile since I've had to use rescue mode. But find where your / partition is mounted to then:

chroot /mnt/<root partition location>

Edit /etc/lilo.conf to change the location of your root partition. lilo is the default MDK bootloader, if not using lilo then its grub.conf

Edit /etc/fstab and change the partition location info.

/sbin/lilo (To rewrite changes to the MBR if using lilo)

You will need to use a console text editor like vi or emacs to modify the files.
 
Old 01-31-2004, 09:25 AM   #3
shirishs
LQ Newbie
 
Registered: Jan 2004
Location: Zurich
Distribution: mandrake
Posts: 10

Original Poster
Rep: Reputation: 0
Hi,
Thanks for the reply.
I rebooted into rescue mode as you said and checked the partition info using
fdisk with options.You are right.My linux partition with / is now /dev/hda7.

But after that I could not go ahead.I tried to use the chroot command as follows.
chroot /mnt/hda7 ..But as hda7 is not a directory, i got the error saying can not find directory /mnt/hda7.So i do not know how i should be using the chroot command once i know the exact partition where my / is residing.I mean how do i change the mount point for /?
I checked /etc/fstab which has the following entry.
/dev/ram3 / ext2 defaults 1 1

So should i change this entry?

Also i did not get the other bit oyu said about
****
/sbin/lilo (To rewrite changes to the MBR if using lilo)
****

neither could i see /etc/lilo.conf or /etc/grub.conf.
So just changing /etc/fstab entry will solve my problem?
and what should i change it to from the current(/dev/ram3 / ext2 defaults 1 1) value to??

regards,
Shirish
 
Old 01-31-2004, 01:29 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Let me explain...

By booting rescue mode from the CD the OS is actually running from a ram drive hence the /dev/ram3. So looking at /etc is not from your real / partition. And that is why there isn't a lilo.conf.

You need to mount the root partition. I thought there was a menu selection from rescue mode to accomplish this. If not you can use the mount command.

You want to chroot to the mount point of the / partition not the device.
chroot /mnt/<root_partition>

So not instead of / being /dev/ram3 it will be your actual / partition.

Now you can edit your lilo.conf and /etc/fstab file.
 
Old 01-31-2004, 05:20 PM   #5
shirishs
LQ Newbie
 
Registered: Jan 2004
Location: Zurich
Distribution: mandrake
Posts: 10

Original Poster
Rep: Reputation: 0
Hi,
I did as you said.And yes,the rescue disk gives option to mount the file systems
.I confirmed the partition information using fdisk -l | /dev/hda .
And the root was mounted at /mnt. So i changed the entries in /etc/lilo.conf to point to correct partition "root=/dev/hda7" in 3 places .I guess those 3 entries are for the 3 linux boot options i get through grub boot menu(linux,linux fb and failsafe).Then i changed the fstab entries as follows.
/dev/hda7 / ext2 defaults 1 1

similarly i changed the entries for /home to point to /dev/hda9
and for swap to point to /dev/hda8

And after rebooting, i still get the same error message.Somehow the boot program still does not see those changes.Is it using some other configuration file?I could not find grub.conf any where.

Also i found one interesting thing through PM.It is showing the empty space 0 for both linux ext2 partitions.All space is used up.

What can be the reason?

regards,
Shirish
 
Old 02-01-2004, 01:19 AM   #6
shirishs
LQ Newbie
 
Registered: Jan 2004
Location: Zurich
Distribution: mandrake
Posts: 10

Original Poster
Rep: Reputation: 0
hi,
its me again.Sorry.The problem is solved.By following the exact steps as u said.I was being silly.After doing the changes, i had not run /sbin/lilo .And that was the reason the changes were not written to MBR.MAy be i was too tired yesterday night.

Thanks for all the help.
 
Old 02-02-2004, 01:00 PM   #7
ambelos
Member
 
Registered: Nov 2003
Location: npr, fl, usa
Distribution: suse 9.3 / xp pro sp2
Posts: 226

Rep: Reputation: 30
hey, i have a preaty similar situation here. i repartitioned my harddrive, giveing linux 3 more gigs than before. now, when try to open PM 8.0, it gives me some error saying "Init failed: Error 117. Partition's drive letter cannot be identified". I remembered that, when i was first using PM, i saw my xp partiction called 'C:/' but linux as ':/', so i changed it to 'linux:/'(i mention this just incase it could be the problem).

Now, when i try to boot into linux(RH9), i go through a mostly normal boot up until i get this 'Kernel panic: No init found. Try passing init= option to kernel'.

I was having some trouble with the kernel before this, to begin with. Would it be easier to just reinstall my kernel? Is there a way i can just boot using my RH8 cds to fix my problems? Please HELP!!!! i feel like i have lost my right and left arms and legs without my linux

ps: who of u did not enjoy the IBM/Linux comercial during the superbowl?
 
  


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
dual booting linux/windows but can't access the partitions infantpenguin Linux - Newbie 2 01-28-2005 09:00 PM
Dual-booting two Linux distros - partitions vasudevadas Linux - General 5 11-26-2003 06:11 AM
Warning about changing partitions skewer Linux - General 1 08-03-2003 04:08 PM
Linux Partitions and Tri Booting Hawkster78 Linux - Hardware 2 01-08-2003 02:08 PM
Changing partitions remotely edb49 Linux - General 0 05-10-2002 07:34 AM

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

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