Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
Hello all, I was out of space on my linux partitions and I decided to resize the remaining Windows partition from 5Gig down to 3,5Gig. The resizing went fine (with ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2005
    Location
    France
    Posts
    17

    Adding one partion prevents booting


    Hello all,

    I was out of space on my linux partitions and I decided to resize the remaining Windows partition from 5Gig down to 3,5Gig. The resizing went fine (with a partition manipulation program coming with Mandriva).

    In the space that was left I created a new partition, which, not really understanding what I was doing, I created as /test .
    Creating the partition went fine.

    I then tried to format the partition and it failed. The program told me it renamed all following partitions to allow for the new one, so "hda5" became "hda6" etc.
    The program told me to change the boot system (I just clicked "ok" since I couldn't do otherwise), then proposed me to reboot and...

    Now linux cannot boot. There is a kernel panic because the partition hda5 isn't found.

    I suspect very much that deleting the new partition would solve the problem.

    I can still boot Windows but cannot find anything to tell the boot loader to look for linux in another partition. There is no point at which I can reach a command line.

    So my questions are as follows:

    1. Can I repair this from Windows ?

    2. If not, must I get a live CD ? (I haven't any and am new to linux so it might take time).

    3. Is there a set of commands that could give me the layout of my hard drive and delete/rename partitions ?

    Thank you very much in advance for your answers !

    Cheers,

    Olivier.

  2. #2
    Linux Guru anomie's Avatar
    Join Date
    Mar 2005
    Location
    Texas
    Posts
    1,692
    1. Can I repair this from Windows ?
    Nope.

    2. If not, must I get a live CD ? (I haven't any and am new to linux so it might take time).
    Unless Mandriva has some repair facility included in the install cd, or unless you can somehow use the install cd to boot to the Mandriva installation (both are true for SuSE), then the easiest thing would probably for you to boot with a live cd. I suggest knoppix.

    3. Is there a set of commands that could give me the layout of my hard drive and delete/rename partitions ?
    The
    Code:
    fdisk -l
    command will give you a list of partitions.

    Assuming Mandriva has a menu.lst file (or at least has a symlink called menu.lst), you could also post it here.
    Code:
    cat /boot/grub/menu.lst
    Then someone can help fix your problem without deleting any partition. If you insist on deleting the partion, then have a look at qtparted after booting with your knoppix live cd.

  3. #3
    Linux User
    Join Date
    Sep 2003
    Posts
    254

    Re: Adding one partion prevents booting

    Quote Originally Posted by ariadacapo
    Hello all,
    I suspect very much that deleting the new partition would solve the problem.
    Olivier.
    Lo
    Not the partition only the bad line u write in ur fstab...
    So to add a new partition u need to create it ( ) then to know how linux see it (hdaX) and be sure of that : make a fdisk -l . Then edit ur fstab the line must be something like that:
    Code:
    /dev/hdc6       /divx           ext3    defaults        0       2
    That is a partition I had to stock some data...
    PS:u let mandriva create the filesystem on it for u or u use something l'ke mk2fs?

  4. #4
    Just Joined!
    Join Date
    Aug 2005
    Location
    France
    Posts
    17
    Thanks !
    Well, I managed to boot with the distro CD, which allows to run diskdrake (before interrupting the installation).

    Now I deleted the partition (against your advice ) and here is what my hard drive looks like :

    Code:
    hda1    /mnt/windows    NTFS              3,1Gb
    empty                                     1,6Gb
    hda5                    Journalised FS    5,8Gb
    hda6                    swap              1Gb
    hda7                    Journalised FS    25Gb (my files)
    Since upon deleting the extra partition the names of the others were changed back to original, I thought I was out of trouble... Linux now does start to boot, but unfortunately very quickly this is what I get:

    Bad magic number in super-block while trying to open /dev/hda6. Failed to check filesystem.
    I'm asked whether I want to repair, but it fails and I'm left with just rebooting.

    I now realise (that's how you learn I suppose) that I should have saved the partition table before doing anything. Diskdrake can attempt to restore it automatically but since all my files are on hda7 I don't want this to be touched..
    Do you think that partition hda6 is damaged ? With diskdrake I don't get an option to set a mounting point for it.

    Can you make sense out of this strange super-block magic number thing ?

    Thanks for your advice !
    Big cheers,

    Olivier.

  5. #5
    Linux User
    Join Date
    Sep 2003
    Posts
    254
    Hello
    Could u paste up ur fstab plz? For ur swap u must have sth like that:
    Code:
    /dev/hda2      none           swap      sw
    U should recreate a new partition with the 1,6 Go left empty on ur hd it's not difficult.

  6. #6
    Just Joined!
    Join Date
    Aug 2005
    Location
    France
    Posts
    17
    Ok. Whew... I managed to do an fdisk -l and read the fstab file. Not easy for a beginner.

    Here is what I obain:

    Code:
    fdisk -l
    :

    Code:
    device boot start end  blocks Id system
    /dev/hda1 *  1    417  xxxxxx 7  HPFS/NTFS
    
    /dev/hda2    638  4864 xxxxxx 5  Extended
    /dev/hda5    638  1401 xxxxxx 83 Linux
    /dev/hda6    1402 1541 xxxxxx 82 Linux swap
    /dev/hda7    1542 4864 xxxxxx 83 Linux
    Code:
    less /etc/fstab
    :

    Code:
    /dev/hda6  /            ext3  noatime  1  1
    /dev/hda8  /home        ext3  noatime  1  2
    /dev/hdc   /mnt/cdrom   iso9669  user....  0  0
    /dev/hda1  /mnt/windows ntfs  umask=0, nls=iso8899-15,ro  0  0
    none       /proc        proc  defaults  0  0
    /dev/hda7  swap         swap  defaults  0  0
    I'm a little confused by the differences (I guess so is my computer). Any idea what I should best do ?
    Sorry if I'm long to answer... doing the best I can.

    Thanks again !

    Olivier.

  7. #7
    Linux Guru anomie's Avatar
    Join Date
    Mar 2005
    Location
    Texas
    Posts
    1,692
    Back up your fstab:
    Code:
    cp /etc/fstab /etc/fstab.backup
    So that you always have a version to go back to (even if it is broken at the moment).

    If I had to take a wild guess, the following changes to /etc/fstab should fix the problem:
    Code:
    /dev/hda5  /            ext3  noatime  1  1
    /dev/hda7  /home        ext3  noatime  1  2
    /dev/hdc   /mnt/cdrom   iso9669  user....  0  0
    /dev/hda1  /mnt/windows ntfs  umask=0, nls=iso8899-15,ro  0  0
    none       /proc        proc  defaults  0  0
    /dev/hda6  swap         swap  defaults  0  0

  8. #8
    Just Joined!
    Join Date
    Aug 2005
    Location
    France
    Posts
    17
    I am starting to understand what is happening here...

    Unfortunately I cannot edit the fstab file because it's a "read-only filesystem". Both as root and as my usual username, I could only access the file but not copy or save it.

    Do you have any suggestion to circumvent this ? Would taking the hard drive out of the computer and mounting it as a usb external drive on another (linux) computer help ?

    Olivier.

  9. #9
    Just Joined!
    Join Date
    Aug 2005
    Location
    France
    Posts
    17
    I have tried again and again different ways...

    I cannot have access to my personal files partition (/home/myusername which should be hda7) even under root.
    And I bang into this
    read-only filesystem
    thing everytime I try to do something with the fstab file...
    Code:
    chmod 777 /etc/fstab
    doesn't work, of course.

    Please help... despair slowly sinks in and I need to use my computer more and more...

    Thanks,

    Olivier.

  10. #10
    Just Joined!
    Join Date
    Aug 2005
    Location
    France
    Posts
    17
    Sorry to keep answering myself but I solved the problem, so it's the last time

    Since it didn't work with this "maintenance" konsole (which appeared half-way through booting after the errors), I tried doing it from the mandriva linux installation CD

    Here's how it works, in case someone meets the same problem:

    Boot from cd, launch command
    Code:
    rescue
    (with options such as noacip if necessary). (this rescue thing was not obvious at first !)

    Mount all your partitions in /mnt (it does it all for you from the cd menu)

    Open a console, go and look for the fstab in /mnt/etc/fstab . You can now edit it
    Code:
    vi /mnt/etc/fstab
    and repair your system. Anomie's "wild guess" for the fstab was the right one !

    Anomie and Gnux, thank you. Your help and advice were much appreciated. Now not only do I have a computer that works, but I also learned quite a lot. I hope to be able to help someone one day like you did.
    A big cheers !

    Olivier.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •