Find the answer to your Linux question:
Results 1 to 6 of 6
HI guys! I was working on our PC and screwed up my logical partition. Not much of a concern there but the problem starts when I was trying to repair ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,272

    Partitions Acting Weird. Help Please.


    HI guys!

    I was working on our PC and screwed up my logical partition. Not much of a concern there but the problem starts when I was trying to repair them. My gparted says that my whole HD is empty. In fact, when I try to install an OS, it wanted to install it on the whole HD (80-G).

    This is not accurate though since my windows partition is still well, I think.

    Code:
    root@PartedMagic:/media/sda1# ls
    AUTOEXEC.BAT*              RECYCLER/
    CONFIG.SYS*                System Volume Information/
    Documents and Settings/    WINDOWS/
    IO.SYS*                    boot.ini*
    MSDOS.SYS*                 ntldr*
    NTDETECT.COM*              pagefile.sys*
    Program Files/
    root@PartedMagic:/media/sda1#
    I wanted to wipe out sda2 sda3 & sda4 so that I can start a fresh install but I just can't mount everything.


    Code:
    root@PartedMagic:/# mount /media/sda2
    mount: can't find /media/sda2 in /etc/fstab or /etc/mtab
    
    root@PartedMagic:/# mount /media/sda3
    mount: can't find /media/sda3 in /etc/fstab or /etc/mtab
    
    root@PartedMagic:/# mount /media/sda4
    mount: can't find /media/sda4 in /etc/fstab or /etc/mtab
    
    root@PartedMagic:~# mount /dev/sda3 /media/sda3
    mount: you must specify the filesystem type
    
    root@PartedMagic:~# mount /dev/sda2 /media/sda2
    mount: you must specify the filesystem type
    
    root@PartedMagic:~# mount /dev/sda4 /media/sda4
    /dev/sda4 looks like swapspace - not mounted
    mount: you must specify the filesystem type
    root@PartedMagic:~# 
    
    root@PartedMagic:/# cat /etc/fstab
    proc /proc proc defaults 0 0
    sysfs /sys sysfs defaults 0 0
    devpts /dev/pts devpts gid=4,mode=620 0 0
    shm /dev/shm tmpfs defaults 0 0
    usbfs /proc/bus/usb usbfs devgid=14,devmode=0660 0 0
    /dev/sda1 /media/sda1 ntfs-3g defaults 0 0 #harddisk
    /dev/hda /media/cdrom1 auto defaults,ro 0 0 #cdrom
    
    root@PartedMagic:/# cat /etc/mtab
    proc /proc proc rw 0 0
    sysfs /sys sysfs rw 0 0
    /dev/loop0 /lib/unionfs/usr squashfs rw 0 0
    unionfs /usr unionfs rw,dirs=/usr=rw:/lib/unionfs/usr=ro 0 0
    /dev/loop1 /lib/unionfs/firmware squashfs rw 0 0
    unionfs /lib/firmware unionfs rw,dirs=/lib/firmware=rw:/lib/unionfs/firmware=ro 0 0
    /dev/loop2 /lib/unionfs/modules squashfs rw 0 0
    unionfs /lib/modules unionfs rw,dirs=/lib/modules=rw:/lib/unionfs/modules=ro 0 0
    usbfs /proc/bus/usb usbfs rw 0 0
    /dev/sda1 /media/sda1 fuseblk rw,allow_other,blksize=4096 0 0
    root@PartedMagic:/#
    However, I am confused because fdisk -l says I have those partitions.

    Code:
      ...
    root@PartedMagic:~# fdisk -l
    Warning: invalid flag 0x0000 of partition table 5 will be corrected by w(rite)
    
    Disk /dev/sda: 80.0 GB, 80026361856 bytes
    255 heads, 63 sectors/track, 9729 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x18cc18cb
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1        2004    16097098+   7  HPFS/NTFS
    /dev/sda2            2005        3481    11864002+  83  Linux
    /dev/sda3            3482      269354  2135619645+   5  Extended
    /dev/sda4            3482        3549      546210   82  Linux swap / Solaris
    root@PartedMagic:~#
    Would appreciate some help again. Thank you!
    nujinini
    Linux User #489667

  2. #2
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,755
    Code:
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1        2004    16097098+   7  HPFS/NTFS
    /dev/sda2            2005        3481    11864002+  83  Linux <== Per directions, specify filesystem type to mount this
    /dev/sda3            3482      269354  2135619645+   5  Extended <== Extended partition - these don't get mounted
    /dev/sda4            3482        3549      546210   82  Linux swap / Solaris <== Swap space. Unless you want to use it for swap, there is no reason to mount it

  3. #3
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,272
    /dev/sda2 2005 3481 11864002+ 83 Linux <== Per directions, specify filesystem type to mount this
    Thank you!

    May I please ask how to specify filesystem.

    I tried

    #mount -t /dev/sda2 /media/sda2 and
    mount ext4 /dev/sda2 media/sda2

    but both doesn't work

    Code:
    root@PartedMagic:~# mount ext3 /dev/sda2 /media/sda2
    Usage: mount -V                 : print version
           mount -h                 : print this help
           mount                    : list mounted filesystems
           mount -l                 : idem, including volume labels
    So far the informational part. Next the mounting.
    The command is `mount [-t fstype] something somewhere'.
    Details found in /etc/fstab may be omitted.
           mount -a [-t|-O] ...     : mount all stuff from /etc/fstab
           mount device             : mount device at the known place
           mount directory          : mount known device here
           mount -t type dev dir    : ordinary mount command
    Note that one does not really mount a device, one mounts
    a filesystem (of the given type) found on the device.
    One can also mount an already visible directory tree elsewhere:
           mount --bind olddir newdir
    or move a subtree:
           mount --move olddir newdir
    One can change the type of mount containing the directory dir:
           mount --make-shared dir
           mount --make-slave dir
           mount --make-private dir
           mount --make-unbindable dir
    One can change the type of all the mounts in a mount subtree
    containing the directory dir:
           mount --make-rshared dir
           mount --make-rslave dir
           mount --make-rprivate dir
           mount --make-runbindable dir
    A device can be given by name, say /dev/hda1 or /dev/cdrom,
    or by label, using  -L label  or by uuid, using  -U uuid .
    Other options: [-nfFrsvw] [-o options] [-p passwdfd].
    For many more details, say  man 8 mount .
    root@PartedMagic:~#
    Code:
    root@PartedMagic:~# mount -t /dev/sda2 /media/sda2
    Usage: mount -V                 : print version
           mount -h                 : print this help
           mount                    : list mounted filesystems
           mount -l                 : idem, including volume labels
    So far the informational part. Next the mounting.
    The command is `mount [-t fstype] something somewhere'.
    Details found in /etc/fstab may be omitted.
           mount -a [-t|-O] ...     : mount all stuff from /etc/fstab
           mount device             : mount device at the known place
           mount directory          : mount known device here
           mount -t type dev dir    : ordinary mount command
    Note that one does not really mount a device, one mounts
    a filesystem (of the given type) found on the device.
    One can also mount an already visible directory tree elsewhere:
           mount --bind olddir newdir
    or move a subtree:
           mount --move olddir newdir
    One can change the type of mount containing the directory dir:
           mount --make-shared dir
           mount --make-slave dir
           mount --make-private dir
           mount --make-unbindable dir
    One can change the type of all the mounts in a mount subtree
    containing the directory dir:
           mount --make-rshared dir
           mount --make-rslave dir
           mount --make-rprivate dir
           mount --make-runbindable dir
    A device can be given by name, say /dev/hda1 or /dev/cdrom,
    or by label, using  -L label  or by uuid, using  -U uuid .
    Other options: [-nfFrsvw] [-o options] [-p passwdfd].
    For many more details, say  man 8 mount .
    root@PartedMagic:~#
    Last edited by nujinini; 05-30-2010 at 07:00 AM.
    nujinini
    Linux User #489667

  4. #4
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,755
    A)
    Code:
    man mount
    Google: linux mount command examples

    B) Does the kernel you're booted into have ext4 filesystem support?

    ** When you type in a command and it spits out the command's usage/help listing, it means your syntax is wrong.

  5. #5
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,272
    Code:
    root@PartedMagic:~# mount -t ext3 /dev/sda2 media/sda2
    mount: wrong fs type, bad option, bad superblock on /dev/sda2,
           missing codepage or helper program, or other error
           In some cases useful info is found in syslog - try
           dmesg | tail  or so
    
    root@PartedMagic:~# mount -t ext4 /dev/sda2 media/sda2
    mount: wrong fs type, bad option, bad superblock on /dev/sda2,
           missing codepage or helper program, or other error
           In some cases useful info is found in syslog - try
           dmesg | tail  or so
    
    root@PartedMagic:~#
    B) Does the kernel you're booted into have ext4 filesystem support?
    By the way, I am using now a Live CD of Parted Magic. So i'm not sure if it supports ext4? Its the first time I encountered this situation

    ** When you type in a command and it spits out the command's usage/help listing, it means your syntax is wrong.
    Thanks!

    EDIT: By the way, I also tried to boot from XP CD but my system does not read it. Grub error.
    nujinini
    Linux User #489667

  6. #6
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,272
    Hi!

    Kids are coming in a few hours and they would like the PC back or else they might ask to borrow my laptop.

    And so I did what any generous father would do. I just reinstalled everything including windows and voila. They can use it as soon as they arrive.

    Thanks
    nujinini
    Linux User #489667

Posting Permissions

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