New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

New installation does not work

Got problems with your B2 or B3? Share and get helped!
Gordon
Posts: 1464
Joined: 10 Aug 2011, 03:18

Re: New installation does not work

Post by Gordon »

Hmmm...

That `File descriptor 5 (pipe:[883]) leaked on pvs invocation` message appears to indicate that some other process may be interfering. Output does seem correct now though. Can you confirm the same for `lvdisplay /dev/bubba`?

I'm unsure whether it is your wish to do a complete reinstall or simply want to get the B3 running again. In the latter case you could now try to boot the B3 normally.

Otherwise yes, you should probably go for `gdisk`, which is the GPT aware version of `fdisk`. I've never been inside the installer mode myself, but if `gdisk` is an unknown command, then most likely `fdisk`will be new enough to also recognize a GPT'd disk (it's not in the regular Bubba OS).

Type: `gdisk /dev/sda`

Next type `p` - this should give you a list of three partitions.
Type `d` - it will ask you to supply the number of the partition to delete. Repeat this action until all partitions are deleted.
Type `w` to write the new partition table and `q` to exit the application.

After reboot, the disk should now be seen as completely empty by the installer.
BadTicket
Posts: 72
Joined: 12 Jan 2012, 13:24

Re: New installation does not work

Post by BadTicket »

When I use "vdisplay /dev/bubba" I get:
File descriptor 5 (pipe:[887]) leaked on lvdisplay invocation. Parent PID 509: -sh
--- Logical volume ---
LV Name /dev/bubba/storage
VG Name bubba
LV UUID QhApWy-ofM5-I4TP-lD2z-02Hq-YXZv-B2mGZK
LV Write Access read/write
LV Status available
# open 1
LV Size 1.81 TB
Current LE 474115
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0
And the end of this, I would like to use the B3 as a B3 again, because I would use the Logitech Media Server on it to feed my squeezeboxes with I small NAS that uses low energy.
So maybe "gdisk" is nit a good idea?
Gordon
Posts: 1464
Joined: 10 Aug 2011, 03:18

Re: New installation does not work

Post by Gordon »

Can't say.

Clearing all the partitions on the disk should make the installer recreate them from scratch. I just wonder if that is really necessary, since the issue that caused the B3 to become non bootable appears to be a broken /home partition (the LVM on /dev/sda2).

Did you try booting from disk? One other thing you could try is mount the partition and see if you get any errors from that.

Code: Select all

# Create folder to mount on
mkdir /mnt/storage

# Activate bubba volume
vgchange -a y  bubba

# Mount 
mount  /dev/mapper/bubba-storage  /mnt/storage
If this fails, then like I said before you can skip mounting this partition at boot time by putting a hashtag in front of its entry in fstab. Like so:

Code: Select all

# Mount the root partition
mkdir /mnt/root
mount /dev/sda1 /mnt/root

# Edit fstab
nano /mnt/root/etc/fstab
 
# Show result
cat /mnt/root/etc/fstab

    #/dev/mapper/bubba-storage	/home	ext3	noatime	0	2
    /dev/sda1	/	ext3	noatime,defaults	0	1
    /dev/sda3	none	swap	sw	0	0
    /proc	/proc	proc	defaults	0	0
    usbfs	/proc/bus/usb	usbfs	defaults	0	0
(return from `cat` is not actually indented, but this is to differentiate from what you should type)

If bubba OS itself is sane, then you should now be able to boot it. If that is the case and you do not intend to add a second disk to it, either for mirroring or extending capacity, then I suggest you don't reinstall but make the following changes:
  1. disable swap: `swapoff -a`
  2. use gdisk to delete partitions #2 and #3
  3. still in gdisk, create a new partition of size 1GB and type swap (hex code 8200)
  4. use the rest of the available space to create a third partition of default type (hex code 8300)
  5. writeout and exit gdisk
  6. edit fstab once more like this:
    #/dev/sda3 /home ext4 noatime 0 2
    /dev/sda1 / ext3 noatime,defaults 0 1
    #/dev/sda2 none swap sw 0 0
    /proc /proc proc defaults 0 0
    usbfs /proc/bus/usb usbfs defaults 0 0
  7. reboot (just to be sure)
  8. create swap space and mount it: `mkswap /dev/sda2 && swapon /dev/sda2`
  9. create file system on /home: `mkfs.ext4 /dev/sda3`
  10. remove the two hash tags in /etc/fstab
  11. `mount /home`
  12. since you won't be using this any more, disable service mdadm: `update-rc mdadm disable`
  13. reboot (just to be sure)
What this does is move swap space to a faster section of the disk and replace the LVM with a regular Linux partition and a more sensible file system (ext4). Still need to do this myself as well, but I'm having issues finding the right moment where I can afford the downtime.
BadTicket
Posts: 72
Joined: 12 Jan 2012, 13:24

Re: New installation does not work

Post by BadTicket »

OK, let's do the next step :P
When I start the B3 without the USB stick, the LED is direct after plugin purple, stays for around 20 seconds and starts then to flash. No change after 30 minutes.

So I try "mkdir /mnt/storage" and get no message (#), then "vgchange -a y bubba" and get:
File descriptor 5 (pipe:[887]) leaked on vgchange invocation. Parent PID 506: -sh
1 logical volume(s) in volume group "bubba" now active
Then I try "mount /dev/mapper/bubba-storage /mnt/storage" and get:
mount: mounting /dev/mapper/bubba-storage on /mnt/storage failed: Device or resource busy
So I try "mkdir /mnt/root", result OK (#), then "mount /dev/sda1 /mnt/root" result OK (#) and then "nano /mnt/root/etc/fstab" where I get;
-sh: nano: not found
anyway, I try "cat /mnt/root/etc/fstab" and get:
cat: can't open '/mnt/root/etc/fstab': No such file or directory
That's all.... THX and Heavenicetrip! Fe/2
Gordon
Posts: 1464
Joined: 10 Aug 2011, 03:18

Re: New installation does not work

Post by Gordon »

Okay, that probably means that the root partition (/dev/sda1) was already formatted and there is nothing to save. Only thing left is to do the gdisk thing to remove all partitions or replace the disk. There shouldn't be any reason for install to fail from there.
BadTicket
Posts: 72
Joined: 12 Jan 2012, 13:24

Re: New installation does not work

Post by BadTicket »

Okidoki...

First I do "swapoff -a" which gave me a # but when I use "gdisk /dev/sda" and "gdisk" alone, I get only:
-sh: gdisk: not found
Should I remove the disk and use gdisk on a Mac or Windows PC?
Gordon
Posts: 1464
Joined: 10 Aug 2011, 03:18

Re: New installation does not work

Post by Gordon »

Try fdisk instead.

Depending on the version it may only show you a single partition, like this

Code: Select all

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1      243202  1953514583+  ee  GPT
Since the object is to clear the disk, it should be okay to simply delete that one partition. Have to say that I do wonder how the installer does the partitioning on a brand new disk :?:

One last alternative: since you can mount /dev/sda1, you could also unpack the payload file onto it yourself. That is, if you can also mount the USB stick.
# mount root
mkdir /mnt/root && mount /dev/sda1 /mnt/root

# mount usb stick
mkdir /mnt/usb && mount /dev/sdb1 /mnt/usb

# change directory
cd /mnt/root

# verify that partition is empty (just to be sure)
ls

# unpack payload file
tar -xzvf /mnt/usb/install/payload/*
Next, prevent the system from mounting /home as explained before. You should be able to boot it normally now, create a user with shell access and ssh into it, become root and do the gdisk magic.
johannes
Posts: 1470
Joined: 31 Dec 2006, 07:12
Location: Sweden
Contact:

Re: New installation does not work

Post by johannes »

Gordon wrote:Have to say that I do wonder how the installer does the partitioning on a brand new disk :?:
Maybe this helps understanding the strange things happening?

https://github.com/Excito/installer/blo ... install.sh
/Johannes (Excito co-founder a long time ago, but now I'm just Johannes)
BadTicket
Posts: 72
Joined: 12 Jan 2012, 13:24

Re: New installation does not work

Post by BadTicket »

So, to mount the USB with "mkdir /mnt/usb && mount /dev/sdb1 /mnt/usb" gives:
mkdir: can't create directory '/mnt/usb': File exists
And "fdisk" or "fdisk /dev/sda" I get only:
-sh: fdisk: not found
Doesn't look good in the (much to warm) december morning....
Gordon
Posts: 1464
Joined: 10 Aug 2011, 03:18

Re: New installation does not work

Post by Gordon »

Makes sense that /mnt/usb would already exist. You could check its contents, or simply type `mount` to view which partitions are mounted on what directory.

Yes Johannes, that does help. The script uses `parted`. And there also appears to be an error in the script:

Code: Select all

	if [ $_lvm_mode == 0 ]; then
Although in some versions of Linux this may actually pass, there should be one equal sign only. It is also exactly this section that we've found here to have been skipped, since it contains everything to fix the broken LVM and it appears that I missed a step or two:

Code: Select all

    echo "Possibly reduce lvm if degraded"
    vgreduce --force --removemissing bubba
    echo "Removing existing lvm"
    lvremove --force /dev/bubba/storage
    vgremove --force bubba
    pvremove --force /dev/sda2
    echo "LVM removed"
(We did the vgreduce, but not the steps to remove the LVM)

And to kill any raid device that may have accidentally been found:

Code: Select all

    echo "Stopping raid devices"
    for x in /dev/md?*
    do
        mdadm --stop $x
    done
    echo "Zero possible raid superblock on data partition"
    mdadm --zero-superblock /dev/sda2
BadTicket
Posts: 72
Joined: 12 Jan 2012, 13:24

Re: New installation does not work

Post by BadTicket »

Makes sense that /mnt/usb would already exist. You could check its contents, or simply type `mount` to view which partitions are mounted on what directory.
OK, I use "mount" after "mkdir /mnt/root && mount /dev/sda1 /mnt/root" and get:
rootfs on / type rootfs (rw)
/dev/root on / type ext2 (rw,relatime)
proc on /proc type proc (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
tmpfs on /tmp type tmpfs (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
udev on /dev type ramfs (rw,relatime)
/dev/pts on /dev/pts type devpts (rw,relatime,mode=600)
/dev/sdb1 on /mnt/usb type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp850,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/sda1 on /mnt/root type ext3 (rw,relatime,errors=continue,barrier=0,data=writeback)
Are you sure that there is no possibility to do all this faster? I mean, you spend a lot of time to help me, which is very kind, but I think we are not coming to an end. For me personally, this bubbaOS - or how ever it is called - seems not very usable for a user like me. OK, when it runs, it was very nice to use it because I have nothing to do, just let it run, but now I think I'm completely overstrained with all that code we do here :(

So as we should have some nice x-mas days, I think we should choose the most radical solution to try it. "disk" does nor work directly, shall I remove the disk and format it with FAT32 on a PC and try to install all from the beginning?
Gordon
Posts: 1464
Joined: 10 Aug 2011, 03:18

Re: New installation does not work

Post by Gordon »

Hi,

Did you also note the response to Johannes? Executing the last two blocks of code in the previous post should fix the issue with the installer and allow it to complete when running it once more. The thing is, you ran into a little installer bug that turned out to be quite nasty because we (that is: I) failed to execute all the required steps manually. So I got to learn about LVM's from this as well and I don't consider this a loss of time.

PS According to the output you posted usb is already mounted, so all you'd need to do is unpack. Which still leaves the manual part of fixing the data partition. Not being a Linux geek, you should probably stick to the former and make it a completely standard B3.
BadTicket
Posts: 72
Joined: 12 Jan 2012, 13:24

Re: New installation does not work

Post by BadTicket »

No, I don't thought that would be helpfiull for me, because I don't understand anything of that code, so I thought it was a discussion between you and Johannes :o So I try it now, copy as written there in the terminal. With the first part I get:
echo "Possibly reduce lvm if degraded"
Possibly reduce lvm if degraded
# vgreduce --force --removemissing bubba
File descriptor 5 (pipe:[754]) leaked on vgreduce invocation. Parent PID 503: -sh
Volume group "bubba" is already consistent
# echo "Removing existing lvm"
Removing existing lvm
# lvremove --force /dev/bubba/storage
File descriptor 5 (pipe:[754]) leaked on lvremove invocation. Parent PID 503: -sh
Logical volume "storage" successfully removed
# vgremove --force bubba
File descriptor 5 (pipe:[754]) leaked on vgremove invocation. Parent PID 503: -sh
Volume group "bubba" successfully removed
# pvremove --force /dev/sda2
File descriptor 5 (pipe:[754]) leaked on pvremove invocation. Parent PID 503: -sh
Labels on physical volume "/dev/sda2" successfully wiped
# echo "LVM removed"
LVM removed
and the second part gives:
echo "Stopping raid devices"
Stopping raid devices
# for x in /dev/md?*
> do
> mdadm --stop $x
> done
-sh: mdadm: not found
# echo "Zero possible raid superblock on data partition"
Zero possible raid superblock on data partition
# mdadm --zero-superblock /dev/sda2
-sh: mdadm: not found
anyway, I try "/bin/sh /bin/bubbainstall.sh" and get:
File descriptor 5 (pipe:[754]) leaked on lvdisplay invocation. Parent PID 517: /bin/sh
Volume group "bubba" not found
Skipping volume group bubba
Waiting for usb device to show up
Mount usb
mount: mounting /dev/sdb1 on /mnt/usb failed: Device or resource busy
mount: mounting /dev/sdb1 on /mnt/usb failed: Device or resource busy
mount: mounting /dev/sdb1 on /mnt/usb failed: Device or resource busy
Gordon
Posts: 1464
Joined: 10 Aug 2011, 03:18

Re: New installation does not work

Post by Gordon »

Okay, I got it now. Quick check of the install script shows that it is actually a bad idea to break into the installer and then run it again.

This is because whenever you boot the B3 into this mode, which is actually the rescue system (with bubba.cfg altered not to install), the installer script will have already mounted the usb device. When running the installer a second time it fails because it does not check for this state and unconditionally tries to mount the usb device. Which fails for obvious reasons.

Thus, if you're inside the rescue system and want to run the installer you must:

Code: Select all

umount /mnt/usb
/bin/bubbainstall.sh
(if you still have /dev/sda1 mounted, unmount this too)

One additional note:
It appears that the procedure to set the date and time during install does not work any more because the corresponding script on the Excito web page no longer exists. It won't break install, but you're bound to see an error. To prevent this you can change the install parameters. Run (with /mnt/usb still mounted):

Code: Select all

echo "#User added content" >> /mnt/usb/install/bubba.cfg
echo "SETDATETIME=0"  >> /mnt/usb/install/bubba.cfg
Similarly, if you've started to hate LVM, you can have the installer create a regular volume:

Code: Select all

echo "USELVM=0"  >> /mnt/usb/install/bubba.cfg
BadTicket
Posts: 72
Joined: 12 Jan 2012, 13:24

Re: New installation does not work

Post by BadTicket »

Greeeeeeeeeaaaaaaaaaaaaaat, the B3 is back again! :P :P :P :P :P :P :P :P :P :P :P :P
Thank you very much for your kind and arduous help!

The only thing that is not working was the update, but as I only use the Logitech Media Server this shouldn't be a problem. So I have to copy the soundless on the B3 and all is OK :lol:

THX and Heavenicetrip! Fe/2
Post Reply