Results 1 to 4 of 4

Thread: Help to restore fstab

  1. #1
    Join Date
    Nov 2009
    Beans
    2

    Help to restore fstab

    Hi All,
    I have a critical issue on a laptop wth dual boot XP and Ubuntu 9.10.
    The partitionning and the install itself went smooth. Here's what I have :
    1 FAT32 XP partition
    1 FAT32 datastorage (shared) partition
    1 Extended
    1 ext4
    1 swap

    fdisk -l

    Code:
    Disk /dev/sda: 160.0 GB, 160041885696 bytes
    255 heads, 63 sectors/track, 19457 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x5ea4f703
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1               1         637     5116671   12  Compaq diagnostics
    /dev/sda2   *         638       10015    75328785    c  W95 FAT32 (LBA)
    /dev/sda3           10016       16525    52291575    c  W95 FAT32 (LBA)
    /dev/sda4           16526       19457    23551290    5  Extended
    /dev/sda5           16526       19075    20482843+  83  Linux
    /dev/sda6           19076       19457     3068383+  82  Linux swap / Solaris
    Problem occured when I tried to have Sylpheed under Ubuntu look into folders on the shared fat32 partition, so that my email will be uptodate regardless of my checking via sylpheed XP or sylpheed Ubuntu. I used symbolic links, and it seems to work fine, as sylpheed ubuntu shows the different folders I also see in sylpheed XP and the right numbers of messages. Problem is : when checking for new mails, sylpheed cannot write file, so I can't access any of the stored or downloaded messages.

    This drove me to consider that the rights are not granted correctly, or that the shared partition is read only. I tried then to edit my fstab according to what I could read in forums and some punctual help, which now shows :

    gksu gedit /etc/fstab

    Code:
    # /etc/fstab: static file system information.
    #
    #  -- This file has been automaticly generated by ntfs-config --
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    
    proc /proc proc defaults 0 0
    # Entry for /dev/sda5 :
    UUID=b414f311-4524-414e-b3ac-dcb2b58a7e70 / ext4 errors=remount-ro 0 1
    # Entry for /dev/sda6 :
    UUID=ca08d496-7edb-4e3d-a31b-135f2a32d427 none swap sw 0 0
    /dev/scd0 /media/cdrom0 udf,iso9660 user,auto,exec,utf8 0 0
    /dev/scd1 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
    # /dev/sda2 /media/xp vfat
    rw,user,auto,exec,gid=100,uid=1000,umask=002,iocharset=utf8,codepage=850,shortname=mixed
    0 0
    # /dev/sda3 /media/Storage vfat
    rw,user,auto,exec,gid=100,uid=1000,umask=002,iocharset=utf8,codepage=850,shortname=mixed
    0 0
    /dev/sdb1 /media/sdb1 ntfs-3g defaults,locale=en_US.UTF-8 0 0
    # /dev/sda2 /media/sda2 vfat defaults 0 0
    # /dev/sda3 /media/sda3 vfat defaults 0 0
    /dev/sda2       /media/hda5     vfat    defaults,utf8,umask=007,gid=46 0       1
    /dev/sda3       /media/hda6     vfat    defaults,utf8,umask=007,gid=46 0       1
    But Ubuntu wouldn't boot up any more; can't seem to find its babies anymore... I tried to edit back fstab to what it was before using the LiveCD, but LiveCD mounts the Ubuntu partition as read-only, so I can't save the fstab file.... I'm completely screwed and I have no idea what to do... Is there any emergency procedure that could help me fix the fstab (at least I could boot normally when the first 2 lines of /dev/sda2 and /dev/sda3 where activated while the last 4 where commented) or do I have to reinstall everything from the beginning ?

    If needed, here's the result of some other commands.
    Cheers for your help!
    n/


    ls -l /dev/disk/by-uuid

    Code:
    total 0
    lrwxrwxrwx 1 root root 10 2009-11-28 13:18 07BE-F1FC -> ../../sda2
    lrwxrwxrwx 1 root root 10 2009-11-28 13:18 0BD6-0D0A -> ../../sda3
    lrwxrwxrwx 1 root root 10 2009-11-28 13:18 16D9-B5D2 -> ../../sda1
    lrwxrwxrwx 1 root root 10 2009-11-28 13:18 b414f311-4524-414e-b3ac-dcb2b58a7e70
    -> ../../sda5
    lrwxrwxrwx 1 root root 10 2009-11-28 13:18 ca08d496-7edb-4e3d-a31b-135f2a32d427
    -> ../../sda6
    mount -a

    Code:
    ntfs-3g: Failed to access volume '/dev/sdb1': No such file or directory
    
    ntfs-3g 2009.4.4 external FUSE 27 - Third Generation NTFS Driver
    
    Copyright (C) 2005-2007 Yura Pakhuchiy
    Copyright (C) 2006-2009 Szabolcs Szakacsits
    Copyright (C) 2007-2009 Jean-Pierre Andre
    Copyright (C) 2009 Erik Larsson
    
    Usage:    ntfs-3g [-o option[,...]] <device|image_file> <mount_point>
    
    Options:  ro (read-only mount), remove_hiberfile, uid=, gid=,
              umask=, fmask=, dmask=, streams_interface=, syncio.
              Please see the details in the manual (type: man ntfs-3g).
    
    Example: ntfs-3g /dev/sda1 /mnt/windows
    
    Ntfs-3g news, support and information:  http://ntfs-3g.org
    cat /var/log/dmesg | grep CD-R && cat /var/log/dmesg | grep fd

    Code:
    [    1.816348] scsi 2:0:0:0: CD-ROM            HL-DT-ST DVDRAM GSA-T10N  PP02
    PQ: 0 ANSI: 5
    [    1.828161] Uniform CD-ROM driver Revision: 3.20
    [    1.828249] sr 2:0:0:0: Attached scsi CD-ROM sr0
    [    0.000000]   bootmap [000000000000f000 -  000000000001efd7] pages 10

  2. #2
    Join Date
    Jul 2008
    Location
    Birmingham, England
    Beans
    2,400

    Re: Help to restore fstab

    You should be able to mount with a live CD - I did when my fstab broke. You will still need to be root though

    Code:
    sudo mkdir /media/temp
    Code:
    sudo mount -t ext4 /dev/sda5 /media/temp
    Code:
    gksu gedit /media/temp/etc/fstab
    There you can eidt your fstab to what it was before. Perhaps someone else can tell you the sudo password for a live CD

  3. #3
    Join Date
    Apr 2009
    Location
    United Kingdom
    Beans
    145
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Help to restore fstab

    Boot up live CD, then use the following in terminal, changing sda5 to your correct partition.

    sudo -i

    mount /dev/sda5 /mnt

    grub-install --root-directory=/mnt/ /dev/sda

    umount /mnt

    works every time
    Free, Open Source Blog Project
    http://www.mi-dia.co.uk

  4. #4
    Join Date
    Nov 2009
    Beans
    2

    Re: Help to restore fstab

    Cheers, I worked all right, I could modify fstab and boot up Ubuntu, very helpful tips and command lines thanks!

    Now do you know any way to have my sda3 partition (fat32, shared by Xp and Ubuntu) mounted at boottime in write access, so that sylpheed ubuntu can write it (that was the purpose originally to modify fstab)? What should my fstab look like, compared to this one :

    Code:
    # /etc/fstab: static file system information.
    #
    #  -- This file has been automaticly generated by ntfs-config --
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    
    proc /proc proc defaults 0 0
    # Entry for /dev/sda5 :
    UUID=b414f311-4524-414e-b3ac-dcb2b58a7e70 / ext4 errors=remount-ro 0 1
    # Entry for /dev/sda6 :
    UUID=ca08d496-7edb-4e3d-a31b-135f2a32d427 none swap sw 0 0
    /dev/scd0 /media/cdrom0 udf,iso9660 user,auto,exec,utf8 0 0
    /dev/scd1 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
    /dev/sda2 /media/xp vfat
    rw,user,auto,exec,gid=100,uid=1000,umask=002,iocharset=utf8,codepage=850,shortname=mixed
    0 0
    /dev/sda3 /media/Storage vfat
    rw,user,auto,exec,gid=100,uid=1000,umask=002,iocharset=utf8,codepage=850,shortname=mixed
    0 0
    /dev/sdb1 /media/sdb1 ntfs-3g defaults,locale=en_US.UTF-8 0 0
    # /dev/sda2 /media/sda2 vfat defaults 0 0
    # /dev/sda3 /media/sda3 vfat defaults 0 0
    # /dev/sda2       /media/hda5     vfat    defaults,utf8,umask=007,gid=46 0       1
    # /dev/sda3       /media/hda6     vfat    defaults,utf8,umask=007,gid=46 0       1

Tags for this Thread

Bookmarks

Posting Permissions

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