The officially official Devuan Forum!

You are not logged in.

#1 2019-06-17 23:26:08

dxrobertson
Member
Registered: 2017-05-04
Posts: 232  

(SOLVED) Install to an SD card

Has anyone successfully done this?

What I am attempting to do-

Install Devuan Ascii netinstall to an SD card/drive as legacy MBR.  The PC has a harddrive, the netinstall medium is a USB drive as sdb, and the SD card is sdc. 

The install went fine; was able to setup partitions for sdc and install the Devuan system to sdc.  The problem comes during the install when grub gets installed.  At first, the default for grub appears that it wants to install grub on the harddrive, which is NOT what I want.  I suspect this because it found my existing Devuan system that resides on the harddrive.  I canceled out of this step and then it presented me with options to install grub to harddrive, sdb, or sdc.  I chose sdc, to install grub on the actual SD card.  All seemed to go well, install completed.

I then booted into newly install SD card, but bios reports no media found.  Yes, I made all the changes to bios to set the SD card as 1st boot and all that.  Tried booting on another PC, same problem.  I then examined the 1st sectors of the SD card and there is no code in the MBR area.  No  55AAh at 01FE.  Thus grub did not install itself into MBR.

Am I mistaken that you can install grub onto the SD card, do I need to use the harddrive grub (hopefully not)?  Has anyone successfully done what I am trying to do?

Last edited by dxrobertson (2019-06-18 16:17:18)

Offline

#2 2019-06-18 02:13:48

Panopticon
Member
Registered: 2018-01-27
Posts: 306  

Re: (SOLVED) Install to an SD card

I know on archlinux you can do the following. Ive never tried this on an sd card or devuan though.

grub-install --target=i386-pc --recheck --boot-directory=/DATA_MOUNTPOINT/boot /dev/sdX3

That way it wont add itself to the grub menu on your hdd and you can boot from the bios. But check below link for more info as you will then need to configure grub on the drive. Go to the section on "Configuring GRUB"

https://wiki.archlinux.org/index.php/Mu … _USB_drive

Last edited by Panopticon (2019-06-18 06:20:44)

Offline

#3 2019-06-18 06:44:34

ToxicExMachina
Member
Registered: 2019-03-11
Posts: 210  

Re: (SOLVED) Install to an SD card

There is no difference between SD card and HDD. Just install bootloader on SD card when installer will ask you. You can also chroot to your SD card and install GRUB manually.

Offline

#4 2019-06-18 11:39:38

Panopticon
Member
Registered: 2018-01-27
Posts: 306  

Re: (SOLVED) Install to an SD card

ToxicExMachina wrote:

There is no difference between SD card and HDD. Just install bootloader on SD card when installer will ask you. You can also chroot to your SD card and install GRUB manually.

I think that is what OP is having an issue with ?

Ive only ever done this with archbang linux and used the installer to install system to /dev/sdb1 then chroot and install grub for multiboot as i linked to in last post of mine. I will have to do an experiment and see if i can install devuan to an sd card.

Last edited by Panopticon (2019-06-18 11:41:47)

Offline

#5 2019-06-18 11:44:37

dxrobertson
Member
Registered: 2017-05-04
Posts: 232  

Re: (SOLVED) Install to an SD card

Panopticon wrote:

I know on archlinux you can do the following. Ive never tried this on an sd card or devuan though.

grub-install --target=i386-pc --recheck --boot-directory=/DATA_MOUNTPOINT/boot /dev/sdX3

That way it wont add itself to the grub menu on your hdd and you can boot from the bios. But check below link for more info as you will then need to configure grub on the drive. Go to the section on "Configuring GRUB"

https://wiki.archlinux.org/index.php/Mu … _USB_drive

I didnt realize grub-install has so many options.  I used this and was able to get grub into the MBR, and get to its grub prompt. Still couldnt boot due to more grub problems.
But thats ok, this did what I needed; get from bios to SD card.

I think the root problem is my declining that grub install step way back on the netinstall.  Grub was probably just os-probing and found my harddrive install.  Got confused.  I will try a reinstall and see how it goes.

Offline

#6 2019-06-18 15:24:58

rolfie
Member
Registered: 2017-11-25
Posts: 1,173  

Re: (SOLVED) Install to an SD card

Well, I have made the experience that I should always removed all other media with OS installations and all USB sticks if I want a clean install. grub always gave me issues when I forgot to follow that rule.

Rolf

Online

#7 2019-06-18 16:21:52

dxrobertson
Member
Registered: 2017-05-04
Posts: 232  

Re: (SOLVED) Install to an SD card

Reinstalled the netinstall.iso.  Was careful around the grub install.  Installed grub and installed it to /dev/sdc (the SC card).  All ok now, can boot fine from the card.  Grub os-probe created entries for the harddrive instance of Devuan, which I dont want, but thats ok; easily fixed.

Offline

#8 2019-06-19 12:31:00

Panopticon
Member
Registered: 2018-01-27
Posts: 306  

Re: (SOLVED) Install to an SD card

^ Atleast you have a grub backup on the sd card for the harddrive, could come in handy.

Last edited by Panopticon (2019-06-19 12:31:19)

Offline

Board footer