LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to add new partition before Linux partition in an existing Linux box? (https://www.linuxquestions.org/questions/linux-software-2/how-to-add-new-partition-before-linux-partition-in-an-existing-linux-box-18894/)

ashutosh 04-19-2002 12:41 AM

How to add new partition before Linux partition in an existing Linux box?
 
Dear Sirs,

I have a 40 GB HDD with following partitions :

PRIMARY
/dev/hda1 - 24 MB - XOSL dedicated
/dev/hda2 - 02 GB - Windows NT Worksataion 4.0
/dev/hda3 - 03 GB - Windows 98 SE

EXTENDED LOGICAL
/dev/hda5 - 04 GB - Shared Data FAT
/dev/hda6 - 14 GB - Shared Data FAT32
/dev/hda7 - 500 MB - Linux Swap
/dev/hda8 - 10 GB - Red Hat 7.1 Linux Native

I am multi booting NT,98,Linux from XOSL.

When I created 1 GB partition out of /dev/hda6 and installed BeOS I can multi boot NT,98,BeOS. Linux boots but gives the message "VFS Kernel Panic could not load etx2 fs".

However if I delete BeOS (or any partition before Linux, for that matter) from MBR by Ranish Partion then I am able to boot LInux without any problem.

It appears to me that inserting new partition before existing Linux partition is creating problem. I even tried to edit /etc/fstab but nothing happened.

DO I HAVE TO RE-INSTALL LINUX EVERY TIME I INSERT/ADD/DELETE ANY PARTITION BEFORE EXISTING LINUX PARTITION?

Let me know if there is any way out?

Ash

mikek147 04-19-2002 07:28 AM

It only causes problems if hda7 and hda8 change to different partition numbers. If you know in advance that, with the addition of a BEOS partition causes hda7 and hda8 to be shifted to hda8 and hda9, respectively, then make these changes to /etc/fstab and /etc/lilo.conf or whatever conf file xosl uses, before you shutdown Linux and create the new partition.

Yes, you have to do this every time your Linux partition numbers change. It might be a bit inconvient, but it does kind of point out that you should have some idea on how you are going to use your platform before you set it up to eliminate these kind of problems. -mk

ashutosh 04-23-2002 01:40 AM

Thanks for reply. I created new partition from Linux cfdisk and made changes in /etc/lilo.conf and /etc/fstab and now my box is working.
:-)

linuxcool 04-23-2002 03:26 AM

There is a way to make things a little easier when you add or remove partitions. Use ' LABEL= ' in your fstab file. Just give your partitions names. Like ' / ' for the root partition and ' swap ' for the swap partition. Then do this:

Old fstab file:

/dev/hda7 swap swap defaults 0 0
/dev/hda8 / ext2 defaults 1 1

New fstab file:

LABEL=swap swap swap defaults 0 0
LABEL=/ / ext2 defaults 1 1

Whenever the partition numbers change because of adding or removing a partition, linux will be able to find the right partition because it will look for the partition names instead of their number. You'll still have to edit the lilo.conf file to point to the new location of the root ' / ' partition.


All times are GMT -5. The time now is 05:11 AM.