Re: Can one now help?

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

 




---------- Forwarded message ----------
From: "Christofer C. Bell" <christofer.c.bell@xxxxxxxxx>
To: Community support for Fedora users <users@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 18 Jul 2010 17:56:35 -0400
Subject: Re: Can one now help?
On 7/18/10, Parshwa Murdia <b330bkn@xxxxxxxxx> wrote:
 
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.

Really good clarification. Thanks Christopher.

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.

Correct, but I ran the following (before you posted this):

[liveuser@localhost ~]$ su -
[root@localhost ~]# kpartx -av /dev/sda
[root@localhost ~]# vgscan
[root@localhost ~]# vgchange -ay
[root@localhost ~]# ls /dev/mapper

Though I didn't understand what this is, but I ran. The last command's output is:

control  live-osimg-min  live-rw  VolGroup-lv_root  VolGroup-lv_swap

which I mounted like:

[root@localhost ~]#  mount /dev/mapper/VolGroup-lv_root /mnt/oldfedora/

(by creating the folder oldfedora in the /mnt directory). After that I just switched to that particular directory and edited the fstab file, the only error (as what I am assuming) was that there was a single space (single character space) between the default, noatime and nodiratime which added everwhere where there was written defaults in the /etc/fstab file. This I did for improving the speed, and really speaking it worked except for that error (http://digitizor.com/2009/01/31/fedora-speed-tweaks-make-fedora-faster/)

I request to confirm if I did in correct way??
 
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

 [root@localhost ~]#  mount /dev/mapper/VolGroup-lv_root /mnt/oldfedora/

But before you posted this I ran this command, you used -t option which I didn't, I guess the first commands (of kpartx -av /dev/sda and vgscan) might have done that work.

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

Now I am able to boot, thanks.
 
---------- Forwarded message ----------
From: "Christofer C. Bell" <christofer.c.bell@xxxxxxxxx>
To: Community support for Fedora users <users@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 18 Jul 2010 17:01:29 -0500
Subject: Re: Can one now help?
I noticed that I actually made a mistake in the below, here's the correction:

On Sun, Jul 18, 2010 at 4:56 PM, Christofer C. Bell <christofer.c.bell@gm
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

That mount command should read, instead:

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

Oh, I see.
 

Where you replace $(hostname) with the hostname of your computer (basically the correct name as given by the lvscan command).

Anyway, sorry for the foul-up!  And again, good luck getting your issue resolved!

Yes. It got resolved.


 
---------- Forwarded message ----------
From: JD <jd1008@xxxxxxxxx>
To: Community support for Fedora users <users@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 18 Jul 2010 15:13:52 -0700
Subject: Re: Can one now help?
 On 07/18/2010 01:24 PM, Parshwa Murdia wrote:

          ---------- Forwarded message ----------
          From: JD <jd1008@xxxxxxxxx <mailto:jd1008@xxxxxxxxx>
       <mailto:jd1008@xxxxxxxxx <mailto:jd1008@xxxxxxxxx>>>
          To: Community support for Fedora users
       <users@xxxxxxxxxxxxxxxxxxxxxxx
       <mailto:users@xxxxxxxxxxxxxxxxxxxxxxx>
       <mailto:users@xxxxxxxxxxxxxxxxxxxxxxx
       <mailto:users@xxxxxxxxxxxxxxxxxxxxxxx>>>
          Date: Sat, 17 Jul 2010 14:31:48 -0700
          Subject: Re: Can one now help?

   Live CD also allows you to just boot the cd without installing it.
   So, do not select install. just boot it and the desktop will come up.
   in desktop, open a terminal:
   Click Applications -> System Tools -> Terminal

   in the shell terminal, mount your fedora partition:
   su -
   No password needed. just press enter.
   mkdir /mydisk
   mount /dev/sdXN /mydisk

   where X is the drive letter and N is the partition number (starts
   at 1) where you installed fedora.

   Now cd to your /etc and edit fstab and fix the problem.

   If you do not know how to do that, post the contents of your fstab
   to this list
   and I am certain someone will tell you what is wrong.


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:
Of course.


mount /dev/sdXN /mydisk
I seriously doubt you did it right.
Mounting a fedora partition using fedora live does not
require you to enter a type.

As root:

mount /dev/sda8 /mydisk

would have mounted your fedora disk partition.


but the error i get is:
*
mount: you must specify the filesystem type* (which comes in the terminal)


You did something wrong, and you do  not tell us what command you entered along with the arguments.

I didn't do anything except what was written, but as Christopher said, and correct, mounting LVM, is quite different. like the above one method.


 
   ---------- Forwarded message ----------
   From: Marko Vojinovic <vvmarko@xxxxxxxxx <mailto:vvmarko@xxxxxxxxx>>
   To: users@xxxxxxxxxxxxxxxxxxxxxxx
   <mailto:users@xxxxxxxxxxxxxxxxxxxxxxx>
   Date: Sun, 18 Jul 2010 19:50:22 +0100
   Subject: Re: Can one now help?
   On Sunday, July 18, 2010 15:39:43 Parshwa Murdia wrote:

How many extended partitions do you have?
Legacy partitions are a total of 4, and can be extended
by having an extended partition, within which you can create 4 partitions.

So please explain how you created these partitions?

What I did is using the live CD, I installed to the hard disk and it was in fact a auto process. I used Fedora Core 11 live CD. Perhaps, I don't know about how these partitions got created, I am seeing it after the automatic installation. But now trying to see.
 
   After you have determined which partition is the Fedora root (in
   what follows
   I will assume that it is /dev/sda2, while you should substitute
   the relevant
   /dev/sd?? instead), you want to mount it somewhere --- typically
   to /mnt
   directory of your running LiveCD Fedora. This is done as follows:

   (1) create a new directory in /mnt, by typing "mkdir /mnt/oldfedora"
   (2) mount the partition to that directory by typing
   "mount /dev/sda2 /mnt/oldfedora" (and don't forget to substitute
   /dev/sda2
   with whatever is relevant for your case)


mounting this (for both sda8 and sda9), it shows me the error:
*
mount: unknown filesystem type 'lvm2pv'* (in the terminal)

and once:
*
mount: you must specify the filesystem type* (in the terminal)

so again it is not getting either mounted.
I repeat,
post the verbatim command you entered.

I repeat, I didn't do anything except what was written, but as Christopher said, and correct, mounting LVM, is quite different. like the above one method.


 
---------- Forwarded message ----------
From: JD <jd1008@xxxxxxxxx>
To: Community support for Fedora users <users@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 18 Jul 2010 15:19:55 -0700
Subject: Re: Can one now help?
 On 07/18/2010 02:11 PM, Gene Heskett wrote:
On Sunday, July 18, 2010 05:09:23 pm Parshwa Murdia did opine:
This is 100% correct.  Linux can understand quite a few file system
architectures, so you need to include a '-t filesystemname' in your mount
command line.  Man mount.

As I already replied, no necessarily true for all filesystem types.
To wit:
$ sudo mount /dev/sdc1 /sdc1
$ ls /sdc1
lost+found/  sdb1.bkup/  sdb3.bkup/  sdb4.bkup/

sdc1 is an ext3 partition and is automatically recognized as such.

Confusing., it didn't work.


 
---------- Forwarded message ----------
From: "Christofer C. Bell" <christofer.c.bell@xxxxxxxxx>
To: Community support for Fedora users <users@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 18 Jul 2010 17:23:56 -0500
Subject: Re: Can one now help?
On 7/18/10, JD <jd1008@xxxxxxxxx> wrote:

As root:

mount /dev/sda8 /mydisk

would have mounted your fedora disk partition.

This ignores the default use of LVM under Fedora.
 
How many extended partitions do you have?
Legacy partitions are a total of 4, and can be extended
by having an extended partition, within which you can create 4 partitions
 
You can create up to 15 logical partitions on a SCSI (and thus SATA) disk and up to 63 on an IDE disk.

Oh I see.
-- 
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