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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-07-2020, 01:53 PM
|
#1
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,605
|
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? - RazPi boot
- x86_64 boot (perhaps with EFI). I have it disabled ATM.
- RazPi /
- X86_64 /
- DATA
|
|
|
09-08-2020, 04:37 AM
|
#2
|
LQ Guru
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: One main distro, & some smaller ones casually.
Posts: 5,884
Rep: 
|
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.
|
09-08-2020, 02:29 PM
|
#3
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,605
Original Poster
|
The big issue is That RazPi needs to ignore a grub MBR. I have posted this query on the slackware arm forum
|
|
|
09-13-2020, 02:34 PM
|
#4
|
LQ Guru
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: One main distro, & some smaller ones casually.
Posts: 5,884
Rep: 
|
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
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.
|
09-14-2020, 03:43 AM
|
#5
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,605
Original Poster
|
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.
|
|
|
09-14-2020, 04:21 AM
|
#6
|
LQ Guru
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: One main distro, & some smaller ones casually.
Posts: 5,884
Rep: 
|
Your welcome, it was an interesting problem that needed answering. 
|
|
|
09-14-2020, 03:51 PM
|
#7
|
Moderator
Registered: Mar 2008
Posts: 22,361
|
I found it interesting also. 
|
|
|
09-14-2020, 03:52 PM
|
#8
|
Moderator
Registered: Mar 2008
Posts: 22,361
|
Dooh!! wrong thread.
|
|
|
All times are GMT -5. The time now is 12:03 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|