I am trying to install Manjaro (manjaro-kde-21.1.5-211008-linux513.iso) on a SD card.
I know that my laptop (Lenovo D330-10igm) does not support booting of an SD card.
For that reason understood that I need to put the /BOOT on a device that is recognized on laptop start up, like internal SSD.
I was able to properly choose the correct destination for Linux Mint, i put the /BOOT on a FAT32 550MB partition and choose to put the Bootloader on the same.
Linux Mint would properly boot after the installation but I was not happy with general performance and choose to try Manjaro.
While installing Manjaro
Choose Manual partitioning
I created a FAT32 partition, mounted it as /BOOT/EFI and flagged it as BOOT and BIOS-GRUB on the internal storage
On the SD card I created a EXT4 partition and mounted is a / (root) and flagged it as ROOT
After the installation the system would boot into GRUB rescue with the message that a certain device is missing (no such device). The ID would be where the ROOT should be, the SD card.
From my understanding is that the installation is not installing the /BOOT and GRUB properly, it looks like it is putting it in the root.
I tried to fix it with the help from few topics on this forum and after about 6 hours of trial-and-error I was able to get the proper GRUB to show but then I would get this kind of message:
In rage i re-installed the Manjaro again and I am once again am stuck on GRUB rescue…
So what did I do wrong while installing the OS?
How can i move the /BOOT from SD card to the FAT32 partition?
When I mount the FAT32 partition in Live I see 2 directories with “Manjaro” and “boot”.
OK, then let’s start from the scratch by booting a LIVE ISO and posting output of
inxi -Fza
sudo fdisk -l
sudo blkid
Generally, installing Manjaro on a SD card not optimal, the SD card is not designed to be used to store a multitasking OS on it. Can’t you save some space on your internal disk to put Manjaro on it? 30 GiB could be enough for the beginning.
Flagging the ESP with
is not a good idea, this flag is dedicated for BIOS booting of a gpt parted disk, I guess you intend to boot in UEFI mode.
Unfortunately I do not really have storage to spare on this laptop and I am aware that installing it on SD is not optimal but at the moment it is my only option.
For setting the bios-grub flag, am i now forced to again do a re-installation?
EDIT: The screenshot provided is from yesterday, the UUID is different because of the re-install from today, i guess.
True but that is more like a work around than a solution for my problem.
I would also need to buy a stick.
I am trying to exhaust the provided hardware that i already have and learn how to properly perform an installation of Manjaro on multiple storage devices.
I still doubt installing on a USB stick is a good idea, but the only thing wrong I have seen is linked to your
/dev/mmcblk1p5
If you want to install Manjaro on the USB stick:
delete /dev/mmcblk1p5
format the USB stick in GPT and format one partition in ext4 (will be your / [“root”] partition).
format /dev/mmcblk1p5 as vfat (512 MiB), set boot flag (only), will be your main ESP.
Boot a live ISO in UEFI mode, run Calamares and place the bootloader into /dev/mmcblk1p5, / (i.e. root folder) assigned to the freshly installed partition of the USB stick.
Reboot into your firmware and select to boot from /dev/mmcblk1p5.
Boot into Manjaro, modify /etc/default/grub to allow os-prober and run sudo update-grub, then reboot.
If everything runs well you should be able to boot into grub’s boot menu and select the OS (Manjaro or Windoze) to boot from there.
I do not want to install on a USB.
I want to put the root on the SD card while having the /boot on “/dev/mmcblk1p5”
The “/dev/mmcblk1p5” is already vfat32 and was already marked as /boot and bios-grub.
The “/dev/mmcblk0p1” is where I want to place my root, on SD card. It was already format as ext4 and as GPT.
All the steps you provided I already did few times (even setting only /boot) and every time i was stuck on step 5 where it would load GRUB rescue.
I will re-install Manjaro again and only set boot flag for /boot:
I think there is a conceptual error in how you are trying to achieve your result.
/boot
is part of the / filesystem
So, if you put just /boot on your ssd - there is no / (root) for it.
The (as for now) missing / on the ssd only becomes accessible once the system boots - which it doesn’t.
Likely because there is no / at that point in time.
This is (you want to put it) on the SD card.
I think you need to put at least / and /boot there - and the rest
like /usr and /home and everything else
on the SD card - and mount those via the / on your ssd
I think it would work that way - but it is a bit of work.
… that is how I would approach it.
Another way to explain my train of thought:
you can’t start from /boot
and later in the process mount / to /boot
/boot needs to be mounted to / - which is exactly the other way around
years ago I fiddled with OpenWRT and those routers had very little storage.
But some had an USB port.
There was a method/script that booted the system from internal storage
and then performed a chroot to the filesystem on the attached USB storage.
That may be the way you need to go …
You cannot do that - either it is EFI or it is BIOS.
A partition type can only be of one type either it is - in the context of booting - an $esp type 0xEF00 or bios-gpt type 0xEF02.
BIOS-GRUB as you call it - is for use when booting a BIOS system with a disk partitioned using GPT. In such case an unformatted 1M partition is required with the partition type 0xEF02 (GPT partition does not have a boot section like MBR).
You have tagged the topic with sd-boot - then you are using Calamares installer - which do not support systemd-boot.
It is clear to me what your goal is.
You will be much better off in your understanding of the process if you use a terminal to do an absolute minimal bootable installation on your SD card.
I am a little bit confused now.
A similar approach was successfully executed while installing Linux Mint, mentioned in original post.
I followed those instructions:
Don’t mess around with various bootloaders.
If the BIOS can’t read it the bootloader usually won’t either.
Essentially, you have to put your linux kernel
and initramfs somewhere where GRUB can read them outright,
preferably on the system drive:
You could shrink the Windows partition to make about 500 MB of space.
Then use your distro installer’s Advanced formatting to create an ext4 formatted boot partition in that free space.
Then put root (/) partition on the microSD.
Alternatively, you can try setting up a partition there manually with fdisk and mkfs.ext4,
then force the distro installer to use it as /boot.
Basically I shrunk my Windows and made a 550 MB partition.
There while Installing Mint was an option to select where to put boot and bootloader.
I chose the 550 MB partition and select whole SD card as / (root)
and Mint would boot properly without errors.
It is possible - what is not possible is to mix BIOS and EFI. Unless you are very sure what you are doing it is easy to mix because even if the existing system is installed using EFI - Legacy mode may be enabled as well and it usually takes precendence over EFI making anything you try to install - install in MBR or BIOS/GPT.
Disable Legacy (MBR, CSM, Compatibility Mode) and boot your system using EFI.
When everything is working with Legacy disabled - then creating an install where the root is on SD card will work as well.
Remember that SDcard is not created for extensive io and as such you need to configure the system to accomodate for this.
On this laptop there is only EFI. I thought that the name BIOS-GRUB means that I could also select where to put bootloader like in Mint, now I know.
I already re-installed Manjaro with /boot and boot flag only on internal storage and put the / root to SD card but it does not boot. It boots to the GRUB rescue.
In post 9 you can see the new options I selected:
It is impossible to guess on why you cannot make it work. There’s even a fair chance of an XY problem so you asking the community why you cannot make it work - is an impossible question.
As I suggested above - you need to find the underlying issue - and the only way of doing that is to know excatly how to create system from scratch.
So I took the time to do a short write-up on how to create a basic system on SD-card.
Thank you for this detailed tutorial.
I followed it and managed to execute it without errors but I still have problem booting.
My laptop does not support booting from SD card.
That is why i need to put /boot and GRUB on an internal device.
I really fail to see what I am doing wrong here and why this is not working.
This was extremely easy with Mint:
Create 550 MB FAT32 partition in internal drive
Mount it as /boot
In dropdown-menu select the same partition to put bootloader in
Create EXT4 partition on whole SD card
Mount it as / root
Perform installation
Restart and it automatically boots into Mint
I am really surprised that a simple installation of an supposed advanced OS is not possible while in other Linux is just few clicks…
The installation process in Calamares is lacking something.