Adding your own custom operating systems to the menu—Berryboot

You can add your own extra operating systems to the Berryboot menu. However this requires that you convert your file system image to SquashFS format first.

Most Raspberry Pi operating system images are disk images containing two partitions. A FAT partition with the boot loader and kernel files, and a second ext4 partition with everything else. We are interested in the second partition.

With a regular Linux desktop computer that haskpartxandmksquashfsinstalled, you can convert the second partition to SquashFS like this:

$ sudo kpartx -av image_you_want_to_convert.img

add map loop0p1 (252:5): 0 117187 linear /dev/loop0 1

add map loop0p2 (252:6): 0 3493888 linear /dev/loop0 118784

$ sudo mount /dev/mapper/loop0p2 /mnt

$ sudo sed -i 's/^\/dev\/mmcblk/#\0/g' /mnt/etc/fstab

$ sudo mksquashfs /mnt converted_image_for_berryboot.img -comp lzo -e lib/modules

$ sudo umount /mnt

$ sudo kpartx -d image_you_want_to_convert.img

Notes:

If kpartx reports it created a mapping different than loop0p2 (e.g. loop4p2) mount that instead. This can happen if loop0 is already in use by something else on the system.

We are excluding /lib/modules from the image, because the kernel modules shipped with Berryboot are used instead, and shared with all distributions.

Some older versions of mksquashfs do not support the ”-comp lzo” option. You can leave it out to let it use gzip compression instead. Advantage of LZO is that it is faster to uncompress, which is a big plus on slow ARM devices, and therefore preferred. This does come at a cost of reduced compression ratio (LZO images are larger than gzip ones).

Put your SquashFS formatted image on a USB stick, go to the “Operating system installer”, hold down your mouse button over “AddOS” and select “Install from USB stick” If your image prefers to have a certain memory split use the extension .img128 .img192, .img224 or .img240 instead of .img.

Tweaks

If the image you are converting is based on Debian/Raspbian delete theetc/console-setup/cached_UTF-8_del.kmap.gzfile before converting the image to force regeneration of the cached keyboard mapping on first boot. This is to make sure it uses the keyboard layout set in Berryboot instead of default British.

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末许赃,一起剝皮案震驚了整個(gè)濱河市顽耳,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌,老刑警劉巖,帶你破解...
    沈念sama閱讀 216,544評(píng)論 6 501
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場(chǎng)離奇詭異哨颂,居然都是意外死亡,警方通過(guò)查閱死者的電腦和手機(jī)相种,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,430評(píng)論 3 392
  • 文/潘曉璐 我一進(jìn)店門威恼,熙熙樓的掌柜王于貴愁眉苦臉地迎上來(lái),“玉大人寝并,你說(shuō)我怎么就攤上這事箫措。” “怎么了衬潦?”我有些...
    開封第一講書人閱讀 162,764評(píng)論 0 353
  • 文/不壞的土叔 我叫張陵斤蔓,是天一觀的道長(zhǎng)。 經(jīng)常有香客問(wèn)我镀岛,道長(zhǎng)弦牡,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 58,193評(píng)論 1 292
  • 正文 為了忘掉前任漂羊,我火速辦了婚禮驾锰,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘走越。我一直安慰自己椭豫,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,216評(píng)論 6 388
  • 文/花漫 我一把揭開白布买喧。 她就那樣靜靜地躺著捻悯,像睡著了一般。 火紅的嫁衣襯著肌膚如雪淤毛。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 51,182評(píng)論 1 299
  • 那天算柳,我揣著相機(jī)與錄音低淡,去河邊找鬼。 笑死瞬项,一個(gè)胖子當(dāng)著我的面吹牛蔗蹋,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播囱淋,決...
    沈念sama閱讀 40,063評(píng)論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼猪杭,長(zhǎng)吁一口氣:“原來(lái)是場(chǎng)噩夢(mèng)啊……” “哼!你這毒婦竟也來(lái)了妥衣?” 一聲冷哼從身側(cè)響起皂吮,我...
    開封第一講書人閱讀 38,917評(píng)論 0 274
  • 序言:老撾萬(wàn)榮一對(duì)情侶失蹤戒傻,失蹤者是張志新(化名)和其女友劉穎,沒(méi)想到半個(gè)月后蜂筹,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體需纳,經(jīng)...
    沈念sama閱讀 45,329評(píng)論 1 310
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,543評(píng)論 2 332
  • 正文 我和宋清朗相戀三年艺挪,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了不翩。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 39,722評(píng)論 1 348
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡麻裳,死狀恐怖口蝠,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情津坑,我是刑警寧澤妙蔗,帶...
    沈念sama閱讀 35,425評(píng)論 5 343
  • 正文 年R本政府宣布,位于F島的核電站国瓮,受9級(jí)特大地震影響灭必,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜乃摹,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,019評(píng)論 3 326
  • 文/蒙蒙 一禁漓、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧孵睬,春花似錦播歼、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,671評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)。三九已至蹈集,卻和暖如春烁试,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背拢肆。 一陣腳步聲響...
    開封第一講書人閱讀 32,825評(píng)論 1 269
  • 我被黑心中介騙來(lái)泰國(guó)打工减响, 沒(méi)想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人郭怪。 一個(gè)月前我還...
    沈念sama閱讀 47,729評(píng)論 2 368
  • 正文 我出身青樓支示,卻偏偏與公主長(zhǎng)得像,于是被迫代替她去往敵國(guó)和親鄙才。 傳聞我的和親對(duì)象是個(gè)殘疾皇子颂鸿,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,614評(píng)論 2 353

推薦閱讀更多精彩內(nèi)容