Berryboot v1.1 - Boot menu / OS installer


547 posts   Page 13 of 22   1 ... 10, 11, 12, 13, 14, 15, 16 ... 22
by Max » Tue Dec 18, 2012 12:48 pm
Aza-Industries wrote:Hey if enyone knows what could be causing this on my Archlinux install let me know!


"No such file" can mean "/sbin/init does not exist", but it can also mean "a library /sbin/init depends on does not exist",


Let's take a look at the Arm Linux image.

Code: Select all
max@lynx:/tmp$ sudo kpartx -av archlinux-hf-2012-09-18.img
add map loop0p1 (252:4): 0 192512 linear /dev/loop0 2048
add map loop0p2 (252:5): 0 3667968 linear /dev/loop0 194560
max@lynx:/tmp$ sudo mount /dev/mapper/loop0p2 /mnt
max@lynx:/tmp$ cd /mnt
max@lynx:/mnt$ ls -l
total 84
drwxr-xr-x  2 root root  4096 Sep  5 11:31 bin
drwxr-xr-x  2 root root  4096 Sep 18 12:25 boot
drwxr-xr-x  2 root root  4096 Jan  1  1970 dev
drwxr-xr-x 40 root root  4096 Sep 18 12:40 etc
drwxr-xr-x  2 root root  4096 Sep 14 09:52 home
lrwxrwxrwx  1 root root     7 Sep 15 00:13 lib -> usr/lib
drwx------  2 root root 16384 Sep 18 12:18 lost+found
drwxr-xr-x  2 root root  4096 Sep 14 09:52 media
drwxr-xr-x  2 root root  4096 Sep 14 09:52 mnt
drwxr-xr-x  3 root root  4096 Sep 18 12:32 opt
dr-xr-xr-x  2 root root  4096 Jul 30 05:59 proc
drwxr-x---  2 root root  4096 Sep 18 12:47 root
drwxr-xr-x  3 root root  4096 Jan  1  1970 run
drwxr-xr-x  2 root root  4096 Sep 18 12:32 sbin
drwxr-xr-x  4 root root  4096 Sep 14 09:52 srv
dr-xr-xr-x  2 root root  4096 Jul 30 05:59 sys
drwxrwxrwt  7 root root  4096 Jan  1  1970 tmp
drwxr-xr-x  9 root root  4096 Sep 14 19:48 usr
drwxr-xr-x 12 root root  4096 Sep 14 19:48 var


That doesn't look right.
Libraries necessary to boot the system MUST be in /lib.

For some reason they want to have a single library directory, and point /lib to /usr/lib.
Lets reverse that, move all libraries to /lib, and make /usr/lib point to /lib instead

Code: Select all
max@lynx:/mnt$ sudo rm lib
max@lynx:/mnt$ sudo mv usr/lib lib
max@lynx:/mnt$ cd usr
max@lynx:/mnt/usr$ sudo ln -s ../lib lib


Create the image, clean up and try again.

Code: Select all
max@lynx:/mnt$ cd /tmp
max@lynx:/tmp$ sudo mksquashfs /mnt Arch_Linux.img240 -comp lzo -e lib/modules
Parallel mksquashfs: Using 4 processors
Creating 4.0 filesystem on Arch_Linux.img240, block size 131072.
[======================================================================================================/] 24562/24562 100%
Exportable Squashfs 4.0 filesystem, lzo compressed, data block size 131072
        compressed data, compressed metadata, compressed fragments, compressed xattrs
        duplicates are removed
Filesystem size 136414.51 Kbytes (133.22 Mbytes)
        46.77% of uncompressed filesystem size (291664.73 Kbytes)
Inode table size 373145 bytes (364.40 Kbytes)
        35.02% of uncompressed inode table size (1065622 bytes)
Directory table size 369763 bytes (361.10 Kbytes)
        54.08% of uncompressed directory table size (683732 bytes)
Number of duplicate files found 2588
Number of inodes 31219
Number of files 25285
Number of fragments 1228
Number of symbolic links  2772
Number of device nodes 3
Number of fifo nodes 1
Number of socket nodes 0
Number of directories 3158
Number of ids (unique uids + gids) 6
Number of uids 2
        root (0)
        unknown (87)
Number of gids 6
        root (0)
        unknown (81)
        unknown (11)
        tty (5)
        staff (50)
        unknown (87)
max@lynx:/tmp$ sudo umount /mnt
max@lynx:/tmp$ sudo kpartx -d archlinux-hf-2012-09-18.img
loop deleted : /dev/loop0
by Aza-Industries » Tue Dec 18, 2012 2:37 pm
Kewl thanks a lot.
Posts: 16
Joined: Tue Dec 18, 2012 7:49 am
by saintdev » Tue Dec 18, 2012 11:08 pm
Max wrote:"No such file" can mean "/sbin/init does not exist", but it can also mean "a library /sbin/init depends on does not exist",


Arch has switched over to a full systemd implementation. I think /sbin/init used to be symlinked to systemd, I'm not sure if this is still the case.

Let's take a look at the Arm Linux image.


That doesn't look right.
Libraries necessary to boot the system MUST be in /lib.


Not true. Arch is using a merged /usr layout where /lib is migrated to /usr/lib.
SELECT `signature` FROM `users` WHERE `username`='saintdev';
Empty set (0.00 sec)
Posts: 39
Joined: Mon Jun 18, 2012 10:56 pm
by wiak » Tue Dec 18, 2012 11:19 pm
would be nice if we had a option to install the os to a partition instead of whole sd card etc?

and please add support for raspbmc and xbian
http://www.raspbmc.com/
http://www.xbian.org/
Posts: 4
Joined: Sun Sep 02, 2012 9:57 pm
by Max » Tue Dec 18, 2012 11:43 pm
saintdev wrote:Arch has switched over to a full systemd implementation. I think /sbin/init used to be symlinked to systemd, I'm not sure if this is still the case.


Yes, it is symlinked to systemd.
That link however is not the problem.

Let's take a look at the Arm Linux image.


That doesn't look right.
Libraries necessary to boot the system MUST be in /lib.


Not true. Arch is using a merged /usr layout where /lib is migrated to /usr/lib.


Any distro other then Arch that does that?

Busybox's switch_root which we use to load and pass over control to systemd does not like your /lib -> /usr/lib symlink construct.
Not sure if that is something in the Busybox code or in the uClibc C library that does not follow symlinks on directories when locating libraries.
But fact is that it works after moving the libraries to /lib
by Max » Wed Dec 19, 2012 12:10 am
wiak wrote:would be nice if we had a option to install the os to a partition instead of whole sd card etc?


Partitioning is too complicated for the target group of this program.

and please add support for raspbmc and xbian
http://www.raspbmc.com/
http://www.xbian.org/


Has come up before.
What are the unique selling points of these XBMC distributions above OpenELEC?
Keep in mind that things like overclocking or a custom kernel do not count, as they will use the same Berryboot kernel and config.txt when started through Berryboot.

Unless there are significant differences, I prefer OpenELEC because it has the smallest footprint and uses the same SquashFS image format as Berryboot requiring no modification.
Last edited by Max on Wed Dec 19, 2012 12:30 am, edited 2 times in total.
by saintdev » Wed Dec 19, 2012 12:14 am
Max wrote:
Not true. Arch is using a merged /usr layout where /lib is migrated to /usr/lib.

Any distro other then Arch that does that?


Fedora were the ones to suggest the merge. I'm not sure they have made the switch yet or not.

Busybox's switch_root which we use to load and pass over control to systemd does not like your /lib -> /usr/lib symlink construct.


That may be the reason then ;)
SELECT `signature` FROM `users` WHERE `username`='saintdev';
Empty set (0.00 sec)
Posts: 39
Joined: Mon Jun 18, 2012 10:56 pm
by Aza-Industries » Fri Dec 21, 2012 2:40 am
This software it great for testing and messing around with different OS cause you can just clone a clean copy and delete any ones you've messed up beyond recognition.

Some things I'm a little confused about though..
- Does each OS have its own space or do they share?
- Do you have to change partition sizes if you want 1 share to use more space?
- When I delete a clone of an OS will that effect its parent in any way?
- Does BerryBoot need to be reinstalled if I move a 4gig image of it over to a 32gig SD?

I'm very confused when it comes to filesystems.. I have no idea how the more base end stuff works.

I've learnt a lot about setting up Arch properly using Berryboot, I can now control it with my old e63 phone to play music that gets output to a DAC. =D
It makes me me confident in messing around with stuff knowing I've got a backup that I can clone to fall back on if I stuff it up.

EDIT: Oh also.. is there a way I can add berryboot terminal to the bootmenu?
EDIT: Oh oh oh and is there a way to connect to Berryboot VIA SSH to select what to boot?

Sorry if these questions have already been answered before I haven't read through all the pages thoroughly yet..
Posts: 16
Joined: Tue Dec 18, 2012 7:49 am
by Max » Fri Dec 21, 2012 7:28 pm
Aza-Industries wrote:- Does each OS have its own space or do they share?


They share.

- Do you have to change partition sizes if you want 1 share to use more space?


Space is not restricted.
As long as there is any left, the OS you are currently using can take it.

- When I delete a clone of an OS will that effect its parent in any way?


Nope

- Does BerryBoot need to be reinstalled if I move a 4gig image of it over to a 32gig SD?


There is an option to connect an USB SD card reader and let Berryboot copy everything to a fresh SD card in the Berrboot code on Github.
Haven't really tested it yet though.

EDIT: Oh also.. is there a way I can add berryboot terminal to the bootmenu?


For what purpose do you plan to use it?

EDIT: Oh oh oh and is there a way to connect to Berryboot VIA SSH to select what to boot?


Not via SSH.
Can use VNC though. (cmdline.txt option "vncinstall")
by AddicusT » Sat Dec 22, 2012 12:37 am
You should add some sort of basic small debian install for those with slow Internet. Like me and some schools.
Posts: 11
Joined: Sat Dec 08, 2012 12:53 am
by Stolen Goods » Sat Dec 22, 2012 7:19 pm
Just came to say that I highly appreciate BerryBoot as a whole. It works wonderfully and I haven't had any problems so far! Thanks for making this!
Defeating the 6KiB profile image limit since 2013.
(Guess who and I'll change it to something else!)
User avatar
Posts: 10
Joined: Mon Dec 17, 2012 2:41 am
by Lonerider » Fri Dec 28, 2012 10:35 pm
When I found Berryboot, that looked very interesting.
So I installed it and tried to net install the RaspRazor.
After the download (bb4 in your walkthrough) I did not get the menu, but the following messages:
"Emergency recovery shell activated
/bin/sh: can't access tty: job control turned off
/#"
So what went wrong here?
How can I get the RaspRazor without Berryboot?
Posts: 2
Joined: Fri Dec 28, 2012 10:26 pm
by Max » Sat Dec 29, 2012 12:30 am
Lonerider wrote:After the download (bb4 in your walkthrough) I did not get the menu, but the following messages:
"Emergency recovery shell activated


If you type "dmesg" there. What are the last couple lines?
Also try installing the memtester profile instead.

How can I get the RaspRazor without Berryboot?


You cannot.
by Max » Sat Dec 29, 2012 2:09 am
Changelog Berryboot 2012-12-29

  • Uses the new Linux 3.6.11 kernel and firmware. Be aware that software that depends on the Pi's graphics acceleration libraries such as OpenELEC needs to be reinstalled.
  • Support for LUKS full disk encryption
  • Fixes keyboard map handling inside Berryboot. If you are using a keyboard with a non-US layout and had problems entering your wifi WPA password in the past, you might want to give it another go.
  • "Backup" button that allows you to connect an USB SD card reader to your Pi, and copy all your data to a fresh SD card. Should work with both larger and smaller cards as long as all data fits.
  • "Repair file system" button to perform a fsck.
  • Now installs both a Raspberry and A10 (Cubieboard and various Android devices) kernel by default, so you can share the same SD card between devices
  • CMA (dynamic memory splits) is now enabled by default for new installations
  • kernel_berryboot.img is now split into a separate kernel (kernel_rpi_aufs.img) and initramfs (berryboot.img) file.

Existing users can update the software by going to the Berryboot GUI and pressing "add OS".
You will then be prompted if you would like to upgrade.


Berryboot installer Android app

If your normal computer lacks a SD card reader, but you do have an Android tablet or TV stick with an SD card slot, you can now also use the new Android app to write Berryboot to SD card.

  • Point the Android webbrowser to http://get.berryboot.com/

    Image
  • Download, open and install the .apk you find there.

    Image

  • Insert an empty SD card in your Android device and press the "write image to SD card" button.

The App can both be used to prepare a SD card for the Raspberry, as well as run Berryboot/Linux on the Android tablet itself.
The last option requires that your tablet has a CPU that is compatible with Berryboot (currently A10 only). If your device qualifies the "Patch image to include hardware information" checkbox will be available, otherwise it will be greyed out.
Just writing the SD card image should work on any rooted Android device, regardless of processor.
by Lonerider » Sat Dec 29, 2012 10:33 am
Max wrote:
Lonerider wrote:After the download (bb4 in your walkthrough) I did not get the menu, but the following messages:
"Emergency recovery shell activated


If you type "dmesg" there. What are the last couple lines?
Here are the last 10 lines:
Code: Select all
[    4.279191] usb 1-1.3.4: Product: USB Optical Mouse
[    4.286057] input: USB Optical Mouse as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3.4/1-1.3.4:1.0/input/input2
[    4.295892] hid-generic 0003:192F:0916.0003: input,hidraw2: USB HID v1.11 Mouse [USB Optical Mouse] on usb-bcm2708_usb-1.3.4/input0
[    4.355935] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[    4.365832] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[    4.846499] EXT4-fs (mmcblk0p2): recovery complete
[    4.849780] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    6.659420] mmc0: missed completion of cmd 18 DMA (512/512 [1]/[1]) - ignoring it
[    6.659482] mmc0: DMA IRQ 6 ignored - results were reset
[    8.256580] smsc95xx 1-1.1:1.0: eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
Also try installing the memtester profile instead.
That works, but does not help me.
How can I get the RaspRazor without Berryboot?


You cannot.

That is bad news. Berryboot updated to V2.0 (berryboot-20121229), but that did not change things.
Posts: 2
Joined: Fri Dec 28, 2012 10:26 pm
by Max » Sat Dec 29, 2012 12:14 pm
Lonerider wrote:
If you type "dmesg" there. What are the last couple lines?
Here are the last 10 lines:


Looks fine.

Also try installing the memtester profile instead.
That works, but does not help me.


Then I don't know what the problem is.

It goes to shell whenever Berryboot crashes.
Which could in turn be caused by hardware problems, but then running memtester or any other program that puts significant load on the Pi would likely crash or hang as well.
by Galo » Sun Dec 30, 2012 8:31 pm
Hi,

First of all, thank you for this great multi boot loader for the Raspi.

I've updated to the last version, but now inside the berryboot menu, my keyboard (logitech k400) won't work. If I reinstall the old berryboot or I use some other distros for the raspy the keyb completly works.

Have any idea or something I should check for helping solve the problem?

TIA

Luca Galassi
Posts: 4
Joined: Sun Dec 30, 2012 8:27 pm
by xopher » Sun Dec 30, 2012 9:21 pm
Very nice useful tool, thank you! I've converted several images and prefer using one larger card.

I did not get an update prompt running add OS. Did I already update via the method described below and if so, will that break future update notifications of Berryboot?

I was reading about firmware updates and realized did not have rpi-update. I copied the script; then it wouldn't execute because the /boot was in the /media folder listed by the volume name.

I mounted /dev/mmcblk0p1 to /boot and ran rpi-update.

....after

The output of uname -v provided PREEMPT Fri Dec 23:06 .....

I noticed the older kernel libs and modules etc.. have been left behind is it safe to delete them now, and did I indeed update the kernel and bits via rpi-update?

If future updates should be smooth after the process described above ignore my next question.

Short of backing up my img+data files and starting fresh how can I make the prompt appear? I'd rather hear the "proper" way than any roundabout way I come up with to make it work unless there's nothing to worry about.

Thanks
Posts: 1
Joined: Sun Dec 30, 2012 8:55 pm
by Max » Sun Dec 30, 2012 9:51 pm
Galo wrote:I've updated to the last version, but now inside the berryboot menu, my keyboard (logitech k400) won't work.


Think I forgot to build the Logitech DJ module into the kernel again.

Can you try if the following version fixes it? berryboot-20121230.zip
If upgrading from an existing installation, do not overwrite the older cmdline.txt
by Max » Sun Dec 30, 2012 10:15 pm
xopher wrote:I did not get an update prompt running add OS


The "do you want to update" prompt will only appear if there is something to update.
You likely already have the latest version.

and did I indeed update the kernel and bits via rpi-update


No, you did not.
The Berryboot AUFS kernel has a different filename (kernel_rpi_aufs.img instead of kernel.img), to prevent people overwriting it by accident.

If rpi-update had succeeded in replacing the AUFS kernel with the standard one, your Pi would no longer boot.
The standard kernel does not know how to mount the filesystem used.
by Funman1111 » Mon Dec 31, 2012 4:04 am
You guys seem smart....help?

viewtopic.php?p=246368#p246368

Oh and berryboot guy...epic... may I suggest you make a web site and put more stuff on it for the pi...if you can do this...I would like to see what else you can do
I got a sigi...deal....
(Solutions and helpful things I find I may send to the wiki)
Posts: 17
Joined: Sun Dec 30, 2012 5:00 am
by Galo » Mon Dec 31, 2012 11:13 am
Max wrote:Can you try if the following version fixes it? berryboot-20121230.zip
If upgrading from an existing installation, do not overwrite the older cmdline.txt



It works perfectly! Thanks!
Posts: 4
Joined: Sun Dec 30, 2012 8:27 pm
by klamathxor » Mon Dec 31, 2012 9:40 pm
I followed these steps and im receiving a kernel panic after reboot. Running berryboot-20121230.zip

Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

/boot/config.txt

disable_overscan=1
kernel=kernel_rpi_aufs.img
initramfs berryboot.img

gpu_mem=16
initramfs networkpatch.cpio 0x00800000




Max wrote:
Franzl wrote:is it possible to add an option for the network settings? dhcp drives me crazy :shock:


Might add a decent configuration dialog for static network configurations in a future version.


If you need the functionality right now, you can do some initramfs patching.
On the Pi, under Debian, create a cpio archive containing /etc/network/interfaces and /etc/resolv.conf files with the desired settings:

Code: Select all
cd /tmp
mkdir -p etc/network
cat >etc/network/interfaces <<EOF
auto eth0
iface eth0 inet static
  address 192.168.88.222
  netmask 255.255.255.0
  gateway 192.168.88.1
EOF
cat >etc/resolv.conf <<EOF
nameserver 192.168.88.1
EOF
find etc | cpio -H newc -o > networkpatch.cpio


Move the archive to the boot partition on the SD card, and add an option to config.txt to tell the bootloader to feed the file to the kernel:

Code: Select all
sudo mount /dev/mmcblk0p1 /boot
sudo cp networkpatch.cpio /boot
sudo sh -c "echo initramfs networkpatch.cpio 0x08000000 >> /boot/config.txt"
sudo umount /boot


The Berryboot system files are inside a so called initramfs cpio archive built-in to the kernel.
The kernel supports having more then one initramfs archive, and will combine them.
If the second initramfs archive contains a file with the same name, it will replace that file, as is done here.
Advantage of having a second initramfs, instead of modifying the original Berryboot initramfs contained inside the kernel, is that it survives updates.
Posts: 7
Joined: Mon Dec 31, 2012 9:33 pm
by LurkAzusa » Tue Jan 01, 2013 1:46 am
First I want to thank you for developing Berryboot. Exactly what I wanted, to be able to boot more than one OS. I have two questions, if you could help.

First, I added addons for hdhomerun (driver for networked TV) and TVheadend in openELEC. It doesn't seem to recognize the addons. Is that because the driver needs to be at the Berryboot level?

Second, I would like to store music, pictures and videos to folders to be available to all the OS's installed. Is this possible? I currently have them in the Music and Video folders in openELEC, but can't see them in Raspbian.
Posts: 8
Joined: Thu Oct 18, 2012 2:27 am
by Max » Wed Jan 02, 2013 3:00 pm
klamathxor wrote:/boot/config.txt

disable_overscan=1
kernel=kernel_rpi_aufs.img
initramfs berryboot.img

gpu_mem=16
initramfs networkpatch.cpio 0x00800000


Seems the bootloader doesn't handle multiple initramfs files.
Can try removing "initramfs networkpatch.cpio 0x00800000" from config.txt and appending networkpatch.cpio to berryboot.img manually.

Code: Select all
cat networkpatch.cpio >> berryboot.img


==

First, I added addons for hdhomerun (driver for networked TV) and TVheadend in openELEC. It doesn't seem to recognize the addons. Is that because the driver needs to be at the Berryboot level?


Do not support any DVB devices that are not in the official rpi kernel.