LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   partition problem ; knoppix to the rescue (https://www.linuxquestions.org/questions/linux-general-1/partition-problem-%3B-knoppix-to-the-rescue-75636/)

jrpretz 07-24-2003 06:50 PM

problem resizing a partition...
 
Here's how I'm partitioned:
> fdisk -l
Disk /dev/hda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1307 10498446 7 HPFS/NTFS
/dev/hda2 1308 4800 28057522+ 83 Linux
/dev/hda3 4801 4864 514080 82 Linux swap

I want to take my Linux partition and cut it up into two. I want to make a /home partition so that I can try out other distributions. That's not important. What is important is that I use fdisk and make my partitions look like this:

Disk /dev/hda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1307 10498446 7 HPFS/NTFS
/dev/hda2 1308 4000 21631522+ 83 Linux
/dev/hda3 4801 4864 514080 82 Linux swap
/dev/hda4 4001 4800 6426000 83 Linux

I do this by deleting partition 2 and adding a new partition 2 and a new partition 4 and write the new table. When I reboot, all I get is
grub>

I tried the grub commands to reboot the system. It doesn't work. I pop in my knoppix cd and the /boot directory is still there on hda2 like it was before. I can mount hda2 and see all the stuff in it. If I use fdisk from knoppix to put everything back, then it boots fine.

What am I missing? Why can't grub find my boot stuff when I change the partition table? Is there any way to fix this?

John

P.S. (I know this whole project is kind of a bad idea, but I'm only using 7 of the 25 gigs in the linux partition, so I'm pretty confident that the last few gigs are free? Is there a way to be certain? )

sidey 07-25-2003 05:28 AM

if you changed your partition using fdisk, you will have lost the data on ther :( reinstall linux with your new partiton table and all should be ok :D


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