FiveNinjas / SliceOS

Bug tracking for the Slice OpenELEC implementation
12 stars 7 forks source link

Dual Boot #10

Open cecemf opened 9 years ago

cecemf commented 9 years ago

Being able to dual boot two different operating systems on SLICE (as per forum request: http://forums.fiveninjas.com/t/multi-boot-option/195/2 )

mod38 commented 9 years ago

In particular, would like to be able to run Raspbian. If install required to change over, should be possible to move Kodi saved settings to safe place on hdd and retrieve when OpenELEC/Kodi reinstalled.

ghollingworth commented 9 years ago

OK,

There are a couple of issues with doing this with NOOBS. Basically it's all to do with how NOOBS works but I'll try to explain...

NOOBS is a recovery system, it was developed to make it as easy as possible to recover the Raspberry Pi without any real knowledge about operating systems. We subsequently added the ability to install multiple operating systems to the SD card but it came with one limitation. When you recover an operating system it will completely wipe everything on the SD card and reinstall all the operating systems you have installed rather than just reinstall the one.

Because of this I made an executive decision to move the /storage directory that OpenELEC uses away from a normal NOOBS partition and instead use the mmcblk0p3 settings partition that specifically is used to hold NOOBS configuration information. The reason I did this was the settings partition does not get wiped during the recovery process and therefore you get to keep your settings when you go through the recovery process.

Now this means that the normal area of the eMMC to install a Raspbian OS onto is very limited (about 60M!) That's why it's slightly more difficult to achieve this, I've first got to work out how I'm going to make sure I don't delete everyone's settings when installing the operating systems but also make it suitable for people without hard drives to use the storage partition to store their data

Just thinking aloud

mod38 commented 9 years ago

Hi Gordon, Thanks for thinking out loud. It's beginning to look as if there might be two different sets of users:

The first set would like a simple dual-boot setup where by making a simple choice during the reboot process the Slice will come up - after a slight delay - in a new configuration. They would not want to have to go through any procedure to save settings as any mistake would lose everything.

The second set are willing to go to a bit more trouble on the changeover and might be willing to give up the convenience of NOOBS to get a clean installation of something else. In my own case as the owner of many PIs I never use NOOBS but just install the required image on an SD card and stick it in. I am hoping that the equivalent will be possible on slice.

The situation is complicated by your wanting to provide for those who want to work diskless and need to keep backup/restore data in the onboard memory. While this is a worthy motive, it does cause problems! I presume of course that diskless users will keep video files on an external hdd or USB key.

It looks to me as if your partitioning solution means that there is no realistic possibility of easy installation of an alternative OS by that route for the moment so what I suggest is the following:

  1. Keep NOOBS as a basic recovery/update system and if you work out how to use it to install another OS well and good
  2. Provide instructions for installing another OS even if this wipes everything so that there is no easy going back. This should allow Raspbian or any of the other PI OS's to be put on Slice.
  3. Provide an ultimate restore procedure for putting OpenELEC back after a wipe. I asked about this before in the context of experimentation causing corruption so it is something that should be available (although it might involve providing for a return of the CM for reprogramming as a last resort!).

As an aside I think that people in the "advanced" set should be willing to fit a small/cheap hdd to the Slice even if they started out diskless. I hope you find this useful.

regards Michael

ghollingworth commented 9 years ago

If anyone would like to have a go at testing this you'll need to do two things:

1) Update your NOOBS installation (press >> on the remote when in NOOBS recovery), make absolutely sure you have a stable and working network! 2) Having updated your NOOBS installation you should see that the installation list is the same as it was before. (bloody, nightly or stable) 3) Press '<<' on the remote to switch to advanced mode. Please note this will wipe all your settings from the SliceOS (you can back them up to get them back later if required) so you'll have to rebuild your library later. 4) After rebooting you should now be able to see a number of different OSes, including SliceOS and Raspbian. 5) Now select as many as you like (I just install Raspbian and SliceOS together as a useful system) and reinstall

You should now get an option menu when you boot up to choose which OS to boot into

Gordon

mod38 commented 9 years ago

Hi Gordon I tried this but I can't update NOOBS. It downloads fine and then sits saying "Testing md5 sumi (Safe to power off / reboot)" with no option except to cancel. Is it me or is there still a problem with NOOBS? Michael

ghollingworth commented 9 years ago

Um... Not sure about that, it might be easier to do it from the command line (which will give you better feedback anyway)

So, go into NOOBS

Ctrl-Alt-F2 will take you to a command line log in username: root password: raspberry

noobs_update

This should give you more output and maybe explain what has gone wrong in the process...

Gordon

mod38 commented 9 years ago

Hi Gordon The md3sum program is checking a file called noobs_test.zip which doesn't exist because the download is called just noobs.zip so it returns a failure. Slice ignored the ninja key during startup by the way when I had a usb keyboard plugged in. I had to wait until I got into NOOBS and then plug it in. Michael

ghollingworth commented 9 years ago

Oops...

Fixed, try again!

mod38 commented 9 years ago

NOOBS update worked without going to command line, now installing SliceOS and Raspbian and will report later. Thanks! Michael

ghollingworth commented 9 years ago

Awesome, not everything will work in Raspbian yet (i.e. the audio codec output, LEDs or real time clock) but we're working on that as well... So should be there very soon!

Otherwise everything USB works so keyboards / mouse / ethernet / WiFi is all working 100%

Gordon

mod38 commented 9 years ago

Got Raspbian configured as I do on a normal Pi with Tightvncserver loaded so that I can run it headless and also another program that stretches the OS: aisleriot solitaire. I was able to edit /etc/networks/interfaces manually to set eth0 and wlan0 to fixed IP addresses. This will be some portable computer when CM2 comes available! SliceOS loaded fine but some of the menu items under Movies showed up as grey squares although the labels were visible at the bottom of the screen. It took me a while to track down how to reload my movie library but it's all there now. Well done! I need to learn a bit more Linux now to make use of the hdd from Raspbian but it all looks very promising. Having the sound codecs and the ability to load Volumio as another alternative OS would be great. I think it may be possible to build Volumio within Raspbian but I'm not sure and the download works great. I have a HiFiberry DAC on a Pi model A driven from a powered hub with a wifi dongle and a 64MB USB stick for my music library at the moment so you can see why I think a Slice should fill this role neatly. regards Michael

Bleep42 commented 9 years ago

Hi Gordon, I have also updated & created a dual boot Slice/Raspbian it all seems to be working fine, of course in Raspbian audio will work perfectly through the hdmi, it's only the analogue audio that isn't working yet? While you're working on the real time clock for Raspbian, can you check the real time clock on the Slice, as per my bug report, because I still have the same problem, ie. With no network connections, after powering down and rebooting a few times the hours are wrong, minutes are correct! after all the whole point of the internal disk is to allow operation without a network connection. If it's only me, then I need to get my Slice returned for repair. Regards Kevin.

ghollingworth commented 9 years ago

Sounds like the time zone is set incorrectly... Can you check what time zone you've set?

Gordon

Bleep42 commented 9 years ago

Hi Gordon, don't think so, every time I reboot, with no network connection, it looses another hour, currently the time here is 11:35, but my Slice, with no network, after a few reboots, is reading 7:35. Settings are. Region: UK(24h) Timezone country: Britain (UK) I'm currently using 20150507221312, but it's always done it. See log files here that show it very nicely, they were recorded in the order 1, 2, 3_ but the time stamps in the files go back an hour in each file, I rebooted the Slice between each one. https://www.dropbox.com/sh/ulvcmkbwofwtbwa/AAD0CPWSbOf6vOWLPdaHKW3wa?dl=0 Regards Kevin.

Bleep42 commented 9 years ago

Because there is only about 500mb of space left on the internal flash after installing Raspian, I've moved the Raspian root file system onto the Slice hard disk, so potentially you've got the whole of the disk available for any installs that you might want. As a reasonably large and taxing test, I've now installed Open Arena, it works just fine. Have just discovered this is a perfect way of ensuring your Raspian setup and installs are not wiped when you do a Slice update, as when you do this Raspian in the flash is also overwritten. After the update all you do is change the cmdline.txt file back, to point at your disk, 'root=/dev/sda1' rather than the flash and your Raspian setup is restored. :-) Kevin

Bleep42 commented 9 years ago

Hi Gordon, I've been using this dual boot system for a while now, but I was finding that Slice was very unstable, crashing randomly, locking up, sometimes then failing to reboot, such that I've re-installed it numerous times and spent a long time working out what is wrong. Finally I've found that the problem is in the /storage partition, it's nothing like big enough; having said that, it looks like there is only about 500mB left on the internal flash with which to make it larger, which may also be needed if Raspian and or Slice grow bigger. :-( The main culprit is the Thumbnails directory, which even with my miserly 30 films and half a dozen TV series, once they are scanned into the library, they were filling the whole of the /storage partition, leaving no room for other things to save stuff there, presumably causing the problems I was having. The fix for me, is to firstly limit the size of the thumbnails being down loaded and also to move the Thumbnails directory onto the Slice hard disk. This has the added bonus of making the loading of thumbnail images much quicker, A, because they are smaller, B, because the hard disk is faster. Please see here:- http://kodi.wiki/view/HOW-TO:Reduce_disk_space_usage

what I have done is create an advancedsettings.xml file in /storage/.kodi/userdata/ the contents of which is:- Hmmm. seems you can't put xml code in here, so here is a link to the file. https://www.dropbox.com/s/sqobvx8ptcqz07e/advancedsettings.xml?dl=0 In short, what this does is re-size all downloaded posters & fanart to a max of 300pixels across. Limit the size of the package folder to 10mB. (where Kodi keeps old installs of addons) Move where Kodi puts all it's thumbnails to the Slice hard disk, called 'Slice', in my case, then in a directory called 'Slice'. You will also need to copy everything from '/storage/.kodi/userdata/Thumbnails' to, in my case, /var/media/Slice/Slice/ Once all is working, you can then delete the contents of the '/storage/.kodi/userdata/Thumbnails' directory. You can also prevent the downloading of Actors photos, if you don't need them, by going to Settings>Videos>Library and un-selecting 'Download actor thumbnails when adding to library'. You can also prevent the downloading of Fanart by turning off the 'Enable Fanart' option in 'the Movie db' and 'TVDB' scraper 'settings' when you first select them, these images can often be very large, so saving a lot of space. Be aware that the Thumbnail directory only grows, there is no tidying up performed when images become obsolete, every image you ever see on the screen, other than video is stored there, it's not unknown for the Thumbnail directory to get to 10s or even hundreds of * Gb *. :-(

Now having done all this my /storage partition is only 20% full and Slice is nice and stable again. :-) Also as a bonus thumbnails are saved and loaded much faster. :-) The clock however is still buggered, when it's got no network connection. :-( Regards, Kevin.