Forum

Full Version: Beta2 [UPGRADE INSTRUCTIONS ONLY!]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6
Terminal

sudo dpkg -r --force-remove-essential xbian-package-initramfs-tools
sudo apt-get -f install
helped me when I got
Quote:dpkg: considering deconfiguration of xbian-package-initramfs-tools, which would be broken by installation of xbian-package-config-shell ...
dpkg: no, xbian-package-initramfs-tools is essential, will not deconfigure
(23rd Nov, 2013 11:57 PM)corona Wrote: [ -> ](edited, see link for full info)
Eventually found a line that worked by trying various versions available in the repo. As it turned out, the newest version of one package (xbian-package-initramfs-tools) would break the only version available of another (xbian-package-config-shell), so I had to pick the oldest version left in the repo. This happened with a couple of other ones too. Here's hoping the vers I've got working are still there the next time someone tries this, or better, the newest version of everything will work together.

Code:
sudo apt-get install -f xbian-update=1.0.2-8d xbian-package-config-shell=2.1.6-51a xbian-package-initramfs-tools=1.3.1-5b xbian-package-xbmc-scripts libhal-storage1 libhal1

fyi you can use "apt-cache show <package name>" to see what versions are avaialble, or as I found easier, just browse http://xbian.brantje.com/pool/wheezy/main/ and http://mirrordirector.raspbian.org/raspbian/pool in a browser

Hope this helps others,
Andrew

ps. I'm really not happy about it automatically rebooting at the end of the dpkg config of xbian-update, that's really unexpected behaviour. Sure, strongly suggest to the user to reboot in big capital letters, but don't auto reboot.
I would normally double check my /etc/network/interfaces is correct before rebooting as I've had it get broken a few times by the gui config and my only console access is via wifi, so it's pretty important for it to work for me at boot. Turns out it wasn't right, and right now I'm locked out of my pi. Now I'm going to have to get a usb keyboard from somewhere to plug in and check the console, in person, at the other end of the house.

Hi all,

After some trying with info from this thread this finally solved the problems for me:

Code:
sudo apt-get install -f xbian-update=1.0.2-8d xbian-package-config-shell=2.1.6-51a xbian-package-initramfs-tools=1.3.1-5b xbian-package-xbmc-scripts libhal-storage1 libhal1

Thank you Corona!

And btw - the Xbian seems to work fine - maybe even a little bit quicker interface than before (but what do I know :-) )
Great work guys!
You're welcome Wink
Do these upgrade instructions also apply to installation, where only /boot is on the sd, and the rest on a usb hd (together with the media lib on a separate partition)?
@Jan,

in general yes, question is what version are you running now and how you created the usb copy.

for beta1X: if you removed subvolumes and adapted fstab to single subvolume btrfs filesystem, then the upgrade won't work (if you would insist on doing upgrade, then I can advise you how easily restore subvolumes). if you still have subvolumes, you should be ok. upgrade to beta2 should respect your root= setting in cmdline.txt and system itself is independent on actually booted root (in the mean of hard coded partition names/labels/uuids).

for alpha5: if general it should work. but this combination hasn't been tested.
@all

I was testing / updating dependencies a bit to help with issues here presented. My test install for this case was XBian Beta1 with 1.2 hotfix (but should be the same for 1.1 hotfix as well as there is no difference in dependencies between the hotfixes nor other packages versions changed in-between).

I put changed deb packages to staging repo for test. This means who has img backup of Beta1.1 / Beta1.2 install and wasn't able to upgrade the distro, use this updated steps:
Code:
1) edit /etc/apt/sources.list to contain this two line for XBian repositories (remove any other XBian records)
   deb http://xbian.brantje.com wheezy main
   deb http://xbian.brantje.com staging main
2) use this command for upgrade
   sudo apt-get install xbian-update -o APT::Force-LoopBreak=1
3) if you get asked about config file / startup file replace, answer Y (yes).

if this will help more, I will move the packages to stable repo later and update instructions.
(1st Dec, 2013 02:20 PM)mk01 Wrote: [ -> ]for beta1X: if you removed subvolumes and adapted fstab to single subvolume btrfs filesystem, then the upgrade won't work (if you would insist on doing upgrade, then I can advise you how easily restore subvolumes). if you still have subvolumes, you should be ok. upgrade to beta2 should respect your root= setting in cmdline.txt and system itself is independent on actually booted root (in the mean of hard coded partition names/labels/uuids).

I am using beta 1.1 and while the were changes partitionwise, when I upgraded from alpha, I am under the impression, that, while I _use_ only a single btrfs volume, the prior partitions still exist (currently unused). Also I have one partition holding my media files.

xbian@xbian ~ $ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 1.4T 0 disk
|-sda1 8:1 0 239.2G 0 part
`-sda3 8:3 0 1.1T 0 part /media/Media-d45fd8fb-1c36-46cf-bc8e-e22c7
loop0 7:0 0 120M 0 loop [SWAP]
zram0 254:0 0 40M 0 disk [SWAP]
mmcblk0 179:0 0 3.7G 0 disk
|-mmcblk0p1 179:1 0 34M 0 part /boot
`-mmcblk0p2 179:2 0 3.6G 0 part

/boot/cmdline.txt reads like that:

sdhci-bcm2708.sync_after_dma=0 dwc_otg.lpm_enable=0 console=tty1 root=/dev/sda1 rootfsopts=noatime,compress=lzo,thread_pool=1,space_cache,autodefrag rootfstype=btrfs rootwait=20 smsc95xx.turbo_mode=N elevator=noop nohdparm splash logo.nologo quiet loglevel=0 noswap mod_scsi.scan=sync

xbian@xbian /boot $ sudo sfdisk -l /dev/sda

Disk /dev/sda: 2930277168 cylinders, 1 heads, 1 sectors/track
Units = cylinders of 512 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/sda1 2048 501637119 501635072 250817536 83 Linux
start: (c,h,s) expected (1023,0,1) found (0,32,33)
end: (c,h,s) expected (1023,0,1) found (1023,254,63)
/dev/sda2 0 - 0 0 0 Empty
/dev/sda3 501640461 2930277164 2428636704 1214318352 83 Linux
/dev/sda4 0 - 0 0 0 Empty
@Jan

no, you don't have subvolumes.

you still wan't to boot from the oversized 240Gb partiion ? not important at the end but, we can use the space. just to be sure send please "findmnt" output on fully booted system and /etc/fstab. but in general you should:
Code:
1) create a backup from current install and new rootfs boot subvolume. just run those command via console:
sudo -i
stop xbmc
btrfs sub create /backup
btrfs sub snap -r / /backup/@mybeta1
btrfs sub create /R
btrfs sub snap /backup/@mybeta1 /R/@

2) reboot from the new subvol=R/@. actually it will be exact copy of your current install
edit /boot/cmdline.txt and "rootfsopts=noatime,compress=lzo,thread_pool=1,space_cache,autodefrag" change to "rootfsopts=subvol=R/@,noatime,compress=lzo,thread_pool=1,space_cache,autodefrag"

3) after boot, remove old files from top sub volume, rename R to "root", create home, home/@ and move /home/* to it. this will be beta1 default install.
sudo -i
stop xbmc
mkdir /tmp/btroot
mount -t btrfs -o subvolid=0 /dev/sda1 /tmp/btroot
cd /tmp/btroot

(with "ls" you should see your original / directory with R as new and "backup" which contains read-only snapshot of your system - so if all is ok, proceed)

find /tmp/btroot -maxdepth 1 | grep -vw '/R\|/backup' | xargs rm -fr
(this will remove all files / directories from old root - but should keep 'R' and 'backup'. check the output first by removing " | xargs rm -fr" from end. this will just output toplevel folder names to screen - double check that both R and backup is not on the list) don't be scary there, backup/@mybeta1 is readonly and can't be removed by rm.

4) now just create default home and home/@, move the files and we are done.
sudo -i
stop xbmc
btrfs sub create /tmp/btroot/home
btrfs sub create /tmp/btroot/home/@
rsync -avx --progress --delete /home/ /mnt/btroot/home/@/
mv /mnt/btroot/R /mnt/btroot/root
cd /; umount /mnt/btroot
rm -fr /home/*
mount -t btrfs -o subvol=home/@ /dev/sda1 /home
start xbmc (for test)

5) edit fstab and put one line to mount /home
/dev/sda1      /home      btrfs       subvol=home/@,noatime      0        0

6) change R/@ in cmdline.txt to correct root/@ (as we renamed the volume already)

it looks boring, but will take you like 10 minutes while keeping one rollback point in case you hit into problems during updates.
so now you are on "standard" beta1/1.X and

update with this steps http://forum.xbian.org/thread-1768-post-18253.html#pid18253
if anything would happen, don't reboot, create new snapshot from the readonly one, reboot into it and you are back with old system in 1minute (just reboot).

the commands to run would be:
Code:
sudo -i
mount -o subvol=/ /dev/sda1 /mnt
btrfs sub snap /mnt/backup/@mybeta1 /mnt/root/@XXX
.
change cmdline.txt - root/@ will change into root/@XXX - reboot

all the commands (beside rm/rsync) will run few seconds - don't expect any data copying / migrations. and you can start like this from scratch over and over again - please don't, just upgrade to B2.

Smile
mk
@mk01,
(2nd Dec, 2013 01:05 PM)mk01 Wrote: [ -> ]just to be sure send please "findmnt" output on fully booted system and /etc/fstab.

findmnt gives me:

Code:
TARGET                                              SOURCE         FSTYPE     OPTIONS
/                                                   /dev/sda1      btrfs      rw,noatime,thread_pool=1,
|-/sys                                              sysfs          sysfs      rw,nosuid,nodev,noexec,re
| |-/sys/kernel/debug                                              debugfs    rw,relatime
| `-/sys/kernel/security                                           securityfs rw,relatime
|-/proc                                             proc           proc       rw,nosuid,nodev,noexec,re
|-/dev                                              udev           devtmpfs   rw,relatime,size=10240k,n
| `-/dev/pts                                        devpts         devpts     rw,nosuid,noexec,relatime
|-/run                                              tmpfs          tmpfs      rw,nosuid,noatime
| |-/run/lock                                                      tmpfs      rw,nosuid,nodev,noexec,re
| |-/run/shm                                                       tmpfs      rw,nosuid,nodev,relatime
| `-/run/user                                                      tmpfs      rw,nosuid,nodev,noexec,re
|-/boot                                             /dev/mmcblk0p1 vfat       rw,relatime,fmask=0022,dm
`-/media/Media-d45fd8fb-1c36-46cf-bc8e-e22c72616a6e /dev/sda3      ext4       rw,nodev,noexec,noatime,n

and fstab is like this:
Code:
proc            /proc           proc    defaults          0       0
root=/dev/sda1  /       btrfs   thread_pool=1,rw,compress=lzo,noatime,autodefrag        0       0
#LABEL=xbian-root-btrfs /home   btrfs   subvol=home/@,thread_pool=1,rw,compress=lzo,noatime,autodefrag  0       0
UUID=8B12-9112  /boot   vfat    defaults        0       0
@Jan

you don't have subvolumes in use. you still have the /home mount in fstab, but it's not mounted so not available and /home content is directly part of rootfs.
Hi,

yesterday evening I tried upgrading my Pi (512 MB RAM version) from 1.1 to 2, the result is, that I my Pi does nothing now when powered on (screen stays black, no rescue console, nothing else). However, there were a few things going awfully wrong.

First, I had the problems described already in this thread and I was finally able to use this piece of advice from Walle above:
Code:
sudo apt-get install -f xbian-update=1.0.2-8d xbian-package-config-shell=2.1.6-51a xbian-package-initramfs-tools=1.3.1-5b xbian-package-xbmc-scripts libhal-storage1 libhal1

But that would have been to easy a solution, my Pi froze apparently so I had to power cycle it. And landed directly into rescue mode since cmdline.txt was missing in /boot and it tried to mount the root partition as ext4 fs. I noticed a cmdline.txt.old lying around there, so a renamed it and rebootet.

I was back in Xbian. Now would have been a GREAT opportunity to take a backup of my configuration files. However, I decided that this can wait just until after I execute
Code:
apt-get -f install

Well, it did install some packages (xbian-xbmc, xbian-xbmc-scripts, etc) and tried to upgrade xbian-update once again. The installation of all packages succeeded with the exception of the xbian-update package, which complained, that it could not make changes to /boot since it apparently was mounted read-only. Anyway, I decided to call it day and right there, you can see it, there would have been ANOTHER GREAT opportunity to take a backup of my configuration files. "But that can wait until tomorrow", I thought.

"But what's that? XBMC asking me to reboot my pi? Why not...." ... yeah, why not indeed Wink

So, what's my point? Is there any way to enter the rescue mode again?
I will try tonight to access the memory card from my laptop (and probably re-flash everything anyway), would you be interested in any kind of logs I could provide?
Unfortunately, I was not able to recover. I could however mount both file systems on my laptop. I even tried replacing initramfs.gz, cmdline.txt and config.txt with the ones from a freshly downloaded beta2 image but to no avail. I ended up zeroing out the SD card and flashing the beta2 directly onto it.
(5th Dec, 2013 09:15 PM)mehlvogel Wrote: [ -> ]Unfortunately, I was not able to recover. I could however mount both file systems on my laptop. I even tried replacing initramfs.gz, cmdline.txt and config.txt with the ones from a freshly downloaded beta2 image but to no avail. I ended up zeroing out the SD card and flashing the beta2 directly onto it.

Please check the content of the /boot/config.txt the next time.
Once I had this issue. I noticed that the content of that files was the same as the content of the /boot/cmdline.txt?!?

KB
hi,

I'm also trying to upgrade from a5 to beta2.

after checking /etc/apt/sources.list and
Terminal
apt-get clean; apt-get update; apt-get upgrade
apt-get install -f xbian-update=1.0.2-8d xbian-package-config-shell=2.1.6-51a xbian-package-initramfs-tools=1.3.1-5b xbian-package-xbmc-scripts libhal-storage1 libhal1
everytime "yes do it" and Y to the config file stuff.

i get the follwing output:
Quote:updating to 1.0 Beta 2
mount: /dev/mmcblk0p2 already mounted or /tmp/btrfs-snap busy
mount: according to mtab, /dev/mmcblk0p2 is mounted on /
Error: unable to mount the filesystem
moving modules directory
mount: /dev/mmcblk0p2 already mounted or /tmp/tmp.6VqtndBiEs busy
mount: according to mtab, /dev/mmcblk0p2 is mounted on /
umount: /tmp/tmp.6VqtndBiEs: not mounted
mount: /dev/mmcblk0p2 already mounted or /lib/modules busy
mount: according to mtab, /dev/mmcblk0p2 is mounted on /
something wrong happened, your xbian may not boot successfully after restart. disabling restart after update finish
updating services

rpi with 512mb
df -h :
Filesystem Size Used Avail Use% Mounted on
/dev/mmcblk0p2 7.3G 2.9G 4.4G 40% /

googl1 also describes this in the second part of post #20.

I would appreciate any suggestions.
This alone mean no error. This is because you are installing on to Alpha5 which is ext4. xbian-update expects at this stage of xbian-update postinst script already update to B2 (from B1.1) - if this would happen step by step during the time, there would be BTRFS now.

Expects doesn't mean needs and absolutely doesn't mean require. At this point there could be even NFS root, error checking + failing script is suppressed there.

The second report is the same case.

But then when you restart not a beep? black screen? My tip is wrongly updated cmdline.txt with rootfs and some other parameters which are taken from user values during cmdline.txt template changing. as again expected was somehow BTRFS (any Beta1). And definitely wrongly expected.

I was trying to figure out this one issue since beginning but realized this only one as internally I was always testing including FS conversion to simulate conditions close to user. That means Alpha5 -> B1. reboot (auto convert) -> apt-get install xbian-update. And could fight with anyone that it must be ok.

Your /boot will probably hold correct kernel and initramfs. Even if the cmdline.txt used for boot can be broken, ther should should be either backup from old one or template for new one (cmdline.new or later stored for reference cmdline.default). If I'm right, then you have cmdline.default. What you need is copy it over wrong cmdline.txt and update cmdline.txt to allow B2 install - still on ext4 - boot like beta2 but trigger conversion like <B1.

so keep all as is, even keep rootfstype=btrfs, but change rootflags=subvol. …. just was looking at the code and don't change anything as when ext4 will be found (but with parameter btrfs on kernel command line), convert will start on unmounted system - so doesn't mnatter and after finish the mount option parameters will be not changed there (as this was task for xbian-update) so after reboot would hit error mounting root and dropdown. so just copy .default over to .txt.

I'm mistaken, I just crated quite nice mini-how-to-restore . what nobody will use anymore, because is dealing wiuth A5. Wink

let me know please.
Pages: 1 2 3 4 5 6
Reference URL's