LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 08-29-2007, 01:55 AM   #1
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,385

Rep: Reputation: 52
How to make LiveCD detect and mount extend/LVM partition


Hi folks,


My HD has extend partition and LVM. Is there any way to detect and mount them on running a LiveCD?


Made following test w/o result.

# 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

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          31      248976   83  Linux
/dev/sda2              32       19457   156039345    5  Extended
/dev/sda5              32       19457   156039313+  8e  Linux LVM
sda1 is mounted automatically with its icon displayed on desktop.

# ls -al /media/sda1
Code:
total 10410
drwxr-xr-x 4 root root    1024 Jul 24 10:21 .
drwxr-xr-x 6 root root    1024 Aug 29 06:14 ..
-rw-r--r-- 1 root root 1033449 Apr 15 02:28 System.map-2.6.20-15-generic
-rw-r--r-- 1 root root  407099 Apr 15 02:28 abi-2.6.20-15-generic
-rw-r--r-- 1 root root   75349 Apr 15 01:02 config-2.6.20-15-generic
drwxr-xr-x 2 root root    1024 Jul 24 10:22 grub
-rw-r--r-- 1 root root 7255399 Jul 24 10:21 initrd.img-2.6.20-15-generic
drwx------ 2 root root   12288 Jul 24 10:13 lost+found
-rw-r--r-- 1 root root   94600 Oct 20  2006 memtest86+.bin
-rw-r--r-- 1 root root 1726608 Apr 15 02:28 vmlinuz-2.6.20-15-generic

# ls /media/
Code:
cdrom0  floppy0  sda1  sda5
sda5 seems mounted as well.


# ls -al /media/sda5
Code:
total 2
drwxr-xr-x 2 root root 1024 Aug 29 06:14 .
drwxr-xr-x 6 root root 1024 Aug 29 06:14 ..
But nothing found on it.

Advice would be appreciated. TIA


B.R.
satimis
 
Old 08-29-2007, 12:36 PM   #2
jay73
Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
If i remember correctly, LVMS need to be mounted differently from regular partitions. Youd would mount a regular one like this:
mount /dev/sda5
but an LVM would be mounted more like this:
mount /dev/VolGroup00/LogVol00.
You'd need to create a /dev/VolGroup00/LogVol00 directory first. Also the numbers may be different on your system.
 
Old 08-30-2007, 09:01 PM   #3
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,385

Original Poster
Rep: Reputation: 52
Solved

Quote:
Originally Posted by jay73 View Post
If i remember correctly, LVMS need to be mounted differently from regular partitions. Youd would mount a regular one like this:
mount /dev/sda5
but an LVM would be mounted more like this:
mount /dev/VolGroup00/LogVol00.
You'd need to create a /dev/VolGroup00/LogVol00 directory first. Also the numbers may be different on your system.
Tks for your advice.


Already solved my problem with following steps and saved my work on an USB pendrive;


- Burned a Knoppix LiveCD - version 5.1.1
(it has lvm-tools available)
- Booted the PC with Knoppix Live CD
- Started a Terminal


$ su
# lvm vgchange --ignorelockingfailure -P -a y
Code:
  Partial mode. Incomplete volume groups will be activated read-only.
  2 logical volume(s) in volume group "ubuntu" now active
It shows the name of the "volume group"


# lvm lvs
Code:
  LV     VG     Attr   LSize   Origin Snap%  Move Log Copy%
  root   ubuntu -wi-a- 142.92G
  swap_1 ubuntu -wi-a-   5.89G
# mkdir /vg_mnt
# mount /dev/ubuntu/root /vg_mnt
# ls /vg_mnt/
Code:
bin   cdrom  etc   initrd      lib         media  proc  sbin  sys  usr  vmlinuz
boot  dev    home  initrd.img  lost+found  opt    root  srv   tmp  var
# ls /vg_mnt/home/satimis/
all my work displayed here.


Inserted an USB pendrive and copied all my work on it.

# umount /vg_mnt

Now I have my work saved on the USB pendrive. Then I successfully copied my files on another PC.


B.R.
satimis
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I mount LVM partition in ubuntu? yesglass Fedora 12 10-24-2013 09:10 AM
Extend LVM partition rconan Linux - Software 5 08-31-2010 02:32 AM
How to extend an existing partition without LVM james.reid Linux - Software 14 06-02-2006 12:48 AM
mount a LVM partition pavi Linux - General 1 10-29-2005 10:56 AM
instalation can't detect my fat32 extend partition indiosmo Slackware 8 05-19-2003 03:49 PM


All times are GMT -5. The time now is 09:46 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration