Page 2 of 2

Re: Cannot boot from rescue usb

Posted: 05 Aug 2011, 05:58
by Cheeseboy
Just a thought:
You know you have to create the directory that is the mount point before mounting anything on it, right?

Re: Cannot boot from rescue usb

Posted: 05 Aug 2011, 13:08
by paulchany
Cheeseboy wrote:Just a thought:
You know you have to create the directory that is the mount point before mounting anything on it, right?
Yes, of course.

Code: Select all

$ ssh root@Bubba_IP
# cd /
# ls
bin dev etc home lib linuxrc mnt opt proc root sbin sys tmp usr var

Code: Select all

# ls mnt/
disk home usb

Code: Select all

# ls /dev | grep mapper
device-mapper

Code: Select all

# ls /dev/device-mapper 
/dev/device-mapper

So /dev/device-mapper isn't a directory.

Can one give to me an uImage file of the 'Linux bubba 2.6.32.13'?

Re: Cannot boot from rescue usb

Posted: 05 Aug 2011, 16:18
by RandomUsername
Just thinking, you may need to make the lvm active. Can't remember the command now and not near my B3. Try Google.

Re: Cannot boot from rescue usb

Posted: 05 Aug 2011, 17:28
by Ubi

Re: Cannot boot from rescue usb

Posted: 07 Aug 2011, 06:39
by paulchany
Now I'm trying to do this:
Initializing a single partition

If you have already a partition, before you can initialize it, the partition type must be changed. You can do it with fdisk, parted, cfdisk, etc. Cfdisk is really simple and is included in the most distributions.

The partition type must be set to

8E

This creates a LVM partition type.

You can now initialize the single partition executing

pvcreate /dev/PARTITION

This creates a volume group descriptor at the start of the partition.
I have on my Bubba Two following partitions:

Code: Select all

fdisk /dev/sda
Device Boot Start End Blocks Id System
/dev/sda1 1 1217 9775521 83 Linux
/dev/sda2 1218 60669 477548190 8e Linux LVM
/dev/sda3 60670 60801 1060290 82 Linux swap

So I did:

Code: Select all

pvcreate /dev/sda2
File descriptor 5 left open
File descriptor 7 left open
Can't initialize physical volume "/dev/sda2" of volume group "bubba" without -ff

When I run the same command but with -vvv option, I get:

Code: Select all

pvcreate -vvv /dev/sda2
File descriptor 5 left open
File descriptor 7 left open
Processing: pvcreate -vvv /dev/sda2
O_DIRECT will be used
global/locking_type not found in config: defaulting to 1
File-based locking selected.
global/locking_dir not found in config: defaulting to /var/lock/lvm
Locking /var/lock/lvm/P_orphans WB
Opened /dev/sda2 RW O_DIRECT
/dev/sda2: block size is 2048 bytes
/dev/sda2: lvm2 label detected
lvmcache: /dev/sda2: now in VG #orphans_lvm2 (#orphans_lvm2)
/dev/sda2: Found metadata at 5632 size 874 (in area at 4096 size 192512) for bubba (GOrWkw-ZuqG-shPr-7ntg-Z0Jl-UPx5-qNC6r5)
lvmcache: /dev/sda2: now in VG bubba with 1 mdas
lvmcache: /dev/sda2: setting bubba VGID to GOrWkwZuqGshPr7ntgZ0JlUPx5qNC6r5
lvmcache: /dev/sda2: VG bubba: Set creation host to bubbatwo.
Closed /dev/sda2
Using cached label for /dev/sda2
Using cached label for /dev/sda2
Opened /dev/ram0 RW O_DIRECT
/dev/ram0: block size is 1024 bytes
/dev/ram0: No label detected
Closed /dev/ram0
Opened /dev/ram1 RW O_DIRECT
/dev/ram1: block size is 4096 bytes
/dev/ram1: No label detected
Closed /dev/ram1
Opened /dev/sda1 RW O_DIRECT
/dev/sda1: block size is 4096 bytes
/dev/sda1: No label detected
Closed /dev/sda1
Opened /dev/ram2 RW O_DIRECT
/dev/ram2: block size is 4096 bytes
/dev/ram2: No label detected
Closed /dev/ram2
Using cached label for /dev/sda2
Opened /dev/ram3 RW O_DIRECT
/dev/ram3: block size is 4096 bytes
/dev/ram3: No label detected
Closed /dev/ram3
Opened /dev/sda3 RW O_DIRECT
/dev/sda3: block size is 2048 bytes

What can I do to solve this problem?

Re: Cannot boot from rescue usb

Posted: 07 Aug 2011, 09:29
by Cheeseboy
If you are desperate, why not try the suggested force option -ff?

Re: Cannot boot from rescue usb

Posted: 07 Aug 2011, 09:39
by paulchany
Cheeseboy wrote:If you are desperate, why not try the suggested force option -ff?
I did it now and get:

Code: Select all

pvcreate /dev/sda2 -ff
File descriptor 5 left open
File descriptor 7 left open
Really INITIALIZE physical volume "/dev/sda2" of volume group "bubba" [y/n]? y
WARNING: Forcing physical volume creation on /dev/sda2 of volume group "bubba"
Physical volume "/dev/sda2" successfully created

and after that I did:

Code: Select all

mount /dev/sda2 /mnt/home/
mount: mounting /dev/sda2 on /mnt/home/ failed: Invalid argument

So what to do further to get mounted my home directory?

Re: Cannot boot from rescue usb

Posted: 07 Aug 2011, 13:55
by Ubi
Can we please take a moment and a step back to reflect on this please? I thought the issue was that a partition on the bubba HD could not be mounted. However, now it seems that an entirely new partition has been made under brutal force. It does not surprise me that this partition will not mount, as the disk was likely already fully allocated. Whatever data there was on /dev/sda2, I guess it's gone now...

Maybe it is a good idea if Paul again sums up what exactly it is he wants to achieve here, and please give us the output of vgdisplay and lvdisplay.

Re: Cannot boot from rescue usb

Posted: 07 Aug 2011, 14:10
by paulchany
Ubi wrote:Can we please take a moment and a step back to reflect on this please? I thought the issue was that a partition on the bubba HD could not be mounted. However, now it seems that an entirely new partition has been made under brutal force. It does not surprise me that this partition will not mount, as the disk was likely already fully allocated. Whatever data there was on /dev/sda2, I guess it's gone now...

Maybe it is a good idea if Paul again sums up what exactly it is he wants to achieve here, and please give us the output of vgdisplay and lvdisplay.
I want to mount /home directory on my Bubba Two because there I made the backup copy of the uImage before I build a new uImage. When I reboot with the new uImage, I can't use Bubba anymore. So now I'm using the rescue USB stick to ssh into my Bubba. I want to mount my home directory and reach there the backup copy of uImage. This uImage want I copy back to the /boot directory so I get my Bubba works again.

Code: Select all

vgdisplay
File descriptor 5 left open
File descriptor 7 left open

Code: Select all

lvdisplay
File descriptor 5 left open
File descriptor 7 left open

Re: Cannot boot from rescue usb

Posted: 07 Aug 2011, 14:46
by Ubi
it's a bit disturbing that usenet reports that feature your "file descriptor X left open" all conclude it's a bug in LVM 2.02, which is the exact LVM version we have on the B3...

does pvdisplay return anything more useful than an error message?
do vgscan, pvscan or lvscan return anything at all?

did you read: http://cpenniman.blogspot.com/2010/02/c ... -open.html

Re: Cannot boot from rescue usb

Posted: 07 Aug 2011, 15:46
by paulchany
Ubi wrote:it's a bit disturbing that usenet reports that feature your "file descriptor X left open" all conclude it's a bug in LVM 2.02, which is the exact LVM version we have on the B3...

does pvdisplay return anything more useful than an error message?
do vgscan, pvscan or lvscan return anything at all?

did you read: http://cpenniman.blogspot.com/2010/02/c ... -open.html
I read it but sorry, I don't understand how affect this in my case.

Code: Select all

pvdisplay
File descriptor 5 left open
File descriptor 7 left open
"/dev/sda2" is a new physical volume of "455.43 GB"
--- NEW Physical volume ---
PV Name /dev/sda2
VG Name
PV Size 455.43 GB
Allocatable NO
PE Size (KByte) 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID mCuFlS-u4q0-pNMb-Iewm-32Co-KdiP-NsgF1z

Code: Select all

vgscan
File descriptor 5 left open
File descriptor 7 left open
Reading all physical volumes. This may take a while...

Code: Select all

pvscan
File descriptor 5 left open
File descriptor 7 left open
PV /dev/sda2 lvm2 [455.43 GB]
Total: 1 [455.43 GB] / in use: 0 [0 ] / in no VG: 1 [455.43 GB]

Code: Select all

lvscan
File descriptor 5 left open
File descriptor 7 left open

Re: Cannot boot from rescue usb

Posted: 07 Aug 2011, 15:54
by Ubi
I'm tempted to suggest your filesystem on sda2 is kaput. I hope someone else here can show that this assumption is wrong...

Re: Cannot boot from rescue usb

Posted: 07 Aug 2011, 16:03
by paulchany
Ubi wrote:I'm tempted to suggest your filesystem on sda2 is kaput. I hope someone else here can show that this assumption is wrong...
Ah, I understand now.
OK, I'm give up now, and when I shall return to my Bubba Two again after 4 days, I think I shall install on it Debian GNU/Linux Squeeze again. But this time if I build again kernel on it, I shall backup uImage and kernel library not on my /home/username mount point but eg.: in /var directory. So from /var directory I can reach it if I run the rescue image again.

Thank you all for help! :D

Re: Cannot boot from rescue usb

Posted: 07 Aug 2011, 16:08
by Cheeseboy
I shall backup uImage and kernel library not on my /home/username mount point but eg.: in /var directory.
I'd recommend using a different machine, and if possible one that is off-site.

Re: Cannot boot from rescue usb

Posted: 08 Aug 2011, 13:43
by Ubi
indeed.