LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 09-07-2020, 01:53 PM   #1
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,605

Rep: Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617
Dual OS live usb?


This is at the 'thought experiment' stage, and I'm not running a serious experiment.

The genesis of this is that I want to have some data available on both a RazPi, and a linux box, and I wondered if it could be done with one live usb key.

The RazPi boots without grub, or sector 0, AFAICT. The 1st partition has to be FAT32. There's a string of gpu firmware, memory allocation, cpu firmware, memory reallocation, peripheral firmware loaded & dealt with; there's several programs on /boot, one f which is loaded that does stuff, and a config.txt that's the equivalent of the BIOS peripheral setup. That config.txt loads the kernel which has it's name mentioned in config.txt. There is a file 'cmdline.txt' which is passed/appended to the kernel providing it's boot parameters, including root=/dev/somewhere. A System.map has to exist for this kernel and is loaded. The entire package in /boot is about 40Megs, and you'd need a little headroom - say 50Megs total. This cannot have grub or lilo (which each think they are the only one about) asking them questions in X86 code.

Linux needs grub, lilo, or something. I'm no longer an expert on non-conformist booting. Alien's live usb, for instance, has a 1M boot partition that's teetotally blank . I've been sticking to old style techniques, and they have served me well.

There's very little room for maneuver in RazPi booting; I can specify a root=/dev/somewhere, but the rest has to be as I said.

So could I have the following setup?
  1. RazPi boot
  2. x86_64 boot (perhaps with EFI). I have it disabled ATM.
  3. RazPi /
  4. X86_64 /
  5. DATA
 
Old 09-08-2020, 04:37 AM   #2
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: One main distro, & some smaller ones casually.
Posts: 5,884

Rep: Reputation: Disabled
The RPi boots by reading the FAT partition & then transfers to the second partition, Linux can boot any partition, & as far as I know, if you add a boot loader for it in the MBR, it should be ignored by the RPi. So, I think you could reduce the size of the RPi / partition, & then install Linux normally, pointing the Linux install to your /home - however, there will be dot files in your /home for both RaspiOS & your Linux version, they may clash.

Probably better to allow both to have their own /home, & have a separate partition for shared data.
 
1 members found this post helpful.
Old 09-08-2020, 02:29 PM   #3
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,605

Original Poster
Rep: Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617
The big issue is That RazPi needs to ignore a grub MBR. I have posted this query on the slackware arm forum
 
Old 09-13-2020, 02:34 PM   #4
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: One main distro, & some smaller ones casually.
Posts: 5,884

Rep: Reputation: Disabled
So, having had my interest piqued, I gave it a go....

Yes it works!

First, dd a RaspiOS image to the drive, before restarting, go to /usr/lib/raspi-config/init_resize & change the line starting with
Code:
TARGET_END=$((
to something that will prevent it using up all the disk, these are in 'sectors', (& I think RaspiOS is using 4096 as the size).
I just stuck in TARGET_END=$((8000)), which prevented it from grabbing all the disk.

I then ran RaspiOS to check it was working OK, it was using about 3.3GB.

Shutdown RaspiOS, then install Linux to the rest of the disk as normal, I used AntiX, (my regular distro), & let it install grub to the MBR.

The RPi that I was using just booted up normally from my USB pendrive, & when I inserted into a regular computer, grub booted up Linux, no problem.

Edit: I was using RaspiOS64 on my RPi3B+

Last edited by fatmac; 09-13-2020 at 02:51 PM.
 
2 members found this post helpful.
Old 09-14-2020, 03:43 AM   #5
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,605

Original Poster
Rep: Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617
Great!
/moan
I'm an stroke victim here, so me trying things can be a big deal, largely because your work rate is _so_slow.
/End moan.

It's good to know the idea works. Thanks for trying it.
 
Old 09-14-2020, 04:21 AM   #6
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: One main distro, & some smaller ones casually.
Posts: 5,884

Rep: Reputation: Disabled
Your welcome, it was an interesting problem that needed answering.
 
Old 09-14-2020, 03:51 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,361

Rep: Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692
I found it interesting also.
 
Old 09-14-2020, 03:52 PM   #8
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,361

Rep: Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692
Dooh!! wrong thread.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Trying to install Peppermint OS from live USB to another USB - can't see USB jones5 Linux - Software 3 05-09-2020 08:08 AM
it will very help if: I download CentOS and create live CDROM and live usb stick lse123 Linux - Server 2 09-24-2011 11:21 AM
[SOLVED] Cannot install Rawhide from Live USB: "Not a live image" Kenny_Strawn Fedora - Installation 18 01-30-2011 10:44 AM
[SOLVED] Can not create live usb for OpenSuse using Live USB creater :( PrinceCruise Linux - General 4 09-23-2009 02:04 PM
forum for live distros (live-usb) schneidz LQ Suggestions & Feedback 1 09-29-2008 01:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration