Re: Can one now help?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/18/10, Parshwa Murdia <b330bkn@xxxxxxxxx> wrote:
one things is that when you say sdXN, X is the drive letter means what drive letter is give to the linux partition? in windows if i see, its H so it should be like sdH9?? in the line:

mount /dev/sdXN /mydisk

but the error i get is:

mount: you must specify the filesystem type
(which comes in the terminal)


The X there isn't really a drive letter.  Under Windows, a "drive letter" really refers to a partition, not a disk, and so the N (the number) is more analogous to a drive letter (but not really, keep reading!).  The X refers to the disk itself.  Under Linux, the 4 portions of that device name are:

* Controller type (IDE, SCSI, SATA, etc) (SCSI and SATA both use 's', IDE uses 'h')
* Device type (disk, tape, etc) (d for disk, t for tape, etc)
* Disk/Controller position (where is the disk on the controller?  Or which controller? Enumerated starting with a, sda, sdb, sdc, etc)
* Partition number (enumerated starting with 1, then 2, 3, 4, etc)

Under this scheme, the first partition of your first disk will be sda1.  Let's look at this:

s - controller is SATA
d - we're talking about a disk device
a - we're talking about the first disk on the controller, really with SATA we're talking about the first controller)
1 - we're talking referencing the first partition on that disk

On Intel PC systems (what most people run Fedora on), the "partition number" field can also tell you what kind of partition it is.  Partitions 1 through 4 are *always* Primary partitions.  Partition 5 is *always* an Extended partition.  Extended partitions will never have a filesystem written directly to them.  Instead, they will contain Logical partitions.  These will be all partitions numbered 6 and beyond.

Let's take a look at the disks in my own system here.  This machine contains 3 disks, each 1.5 TB in size.  I've deleted all the confusing RAID stuff and partition statistics since we don't care about that here:


   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          64      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              64      182402  1464625152   8e  Linux LVM


   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1      182401  1465136032   fd  Linux raid autodetect

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1      182401  1465136001   fd  Linux raid autodetect

We can see from this output that the system has 3 SATA controllers that are in use.  This is evident by each disk being enumerated as sda, sdb, and sdc.  Remember, s = SCSI or SATA (SATA here), the physical disk devices are a, b, and c.  There are 2 partitions (1 and 2) on the first disk, then 1 partition each on the other 2 disks.

Now, all of this ignores what's likely the case if you installed Fedora 13 with the installation defaults.  In that case, you're likely using LVM (and none of the information folks have given so far is going to work).  Notice that in the example above, disk sda2 is of type "Linux LVM" -- this means it's being  used as a PV (physical volume) under LVM management.  We can use the command 'pvscan' to get a listing of all PVs (again, physical volumes, ie; real disk partitions) that are being used and what VG (volume group) they contain:

lvm> pvscan
  PV /dev/sda2   VG vg_circe   lvm2 [1.36 TiB / 0    free]
  PV /dev/md0    VG homevg_1   lvm2 [1.36 TiB / 0    free]
  Total: 2 [2.73 TiB] / in use: 2 [2.73 TiB] / in no VG: 0 [0   ]
lvm>

And here it is!  We see that PV /dev/sda2 (the second partition of the disk on the first SATA controller) contains VG (again, volume group, sort of like an extended partition) vg_circe.  Now, what is inside that volume group?  We can use the command lvscan to find out:

lvm> lvscan
  ACTIVE            '/dev/homevg_1/homelv_1' [1.36 TiB] inherit
  ACTIVE            '/dev/vg_circe/lv_root' [1.36 TiB] inherit
  ACTIVE            '/dev/vg_circe/lv_swap' [5.44 GiB] inherit
lvm>

And there is our root partition.  It's /dev/vg_circe/lv_root.

Now, looking at what you've provided, here's the output of fdisk -l for your machine:

  Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        5737    46082421    7  HPFS/NTFS
/dev/sda2            5738       30400   198105547+   f  W95 Ext'd (LBA)
/dev/sda5            5738        9561    30716248+   7  HPFS/NTFS
/dev/sda6            9562       13385    30716248+   7  HPFS/NTFS
/dev/sda7           13386       15935    20482843+   7  HPFS/NTFS
/dev/sda8   *       15936       15961      204799+  83  Linux
/dev/sda9           15961       28596   101487615+  8e  Linux LVM

You mentioned you were confused that you didn't see sda3 or sda4.  If you recall what I said earlier, this is normal.  That's because you only have 2 primary partitions on your disk.  You have an extended partition (always 5) that contains 4 logical partitions (6, 7, 8, and 9).  Since you only have 2 primary partitions, you won't have an entry for 3 or 4, just 1 and 2.

In looking at your list here, it's likely that sda8 is your /boot filesystem and that sd9 contains your root filesystem and swap partition (assuming a default selection of settings during the installation of Fedora).  Because LVM is in use here, we can't mount the disk partitions directly.  Remember, the disk partition is an LVM physical volume, it's not a filesystem that can be mounted.  However, the logical volumes *are* normal filesystems that can be mounted.

I can't see the hostname of your machine, but I'll wager you didn't change the default installation name of vg_$(hostname) so I'll go with that here:

# mount -t ext4 /dev/mapper/vg_$(hostname)/lv_root /mnt

This will mount the logical volume "lv_root" contained in volume group "vg_yourhostname" under /mnt with a filesystem type of ext4 (what your system is most likely using).  If you receive an error about the wrong filesystem type, then you may be using the ext3 filesystem.  In that case, simply replace ext4 with ext3.  You can then follow the rest of the information provided to restore your backup copy of the fstab (you'll restore your backup to /mnt/etc/fstab, remember, you've mounted your system's root partition under /mnt, the actual /etc directory when booted off the Live CD is the /etc/ on the Live CD).

Here's a real example, done on my own machine using the Live CD:

[liveuser@localhost ~]$ su -
[root@localhost ~]# lvscan
  ACTIVE            '/dev/homevg_1/homelv_1' [1.36 TiB] inherit
  ACTIVE            '/dev/vg_circe/lv_root' [1.36 TiB] inherit
  ACTIVE            '/dev/vg_circe/lv_swap' [5.44 GiB] inherit
[root@localhost ~]# mount -t ext4 /dev/mapper/vg_circe-lv_root /mnt
[root@localhost ~]# ls -l /mnt/etc/fstab*
-rw-r--r--. 1 root root 957 Jun 27 05:00 /mnt/etc/fstab
-rw-r--r--. 1 root root 861 Jun 26 17:46 /mnt/etc/fstab.20100626
[root@localhost ~]#

There's only one part where this gets confusing.  The lvscan told us that the logical volume is /dev/vg_circe/lv_root.  But when we mount it, we use /dev/mapper/vg_circe-lv_root.  Note how we've included "mapper" and we've changed a forward slash (/) to a dash (-).  All you need to do to fix this is copy your backup fstab to /mnt/etc/fstab and reboot.

Good luck!

--
Chris


-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux