Installing LMDE on an SD card

Archived topics about LMDE 1 and LMDE 2
Jenia

Installing LMDE on an SD card

Post by Jenia »

I've tried installing LMDE on an SDHC card from a Samsung Ultrabook NP530U3C which currently only runs Windows 8.
I've disabled SecureBoot in the bios, and that allowed me to select between UEFI-OS and CMS-OS, so I chose the latter - this allowed me to boot into the installation.
I've installed mint into the SD card and made sure to install GRUB to the correct location.

But it won't boot after install. The BIOS definitely recognizes it - it's in the boot list. Trying to boot from it throws me into a screen which demands I select which driver to boot into, with the SD card and HDD being the only options. Pressing either gives a black screen for a moment and then reverts to the same screen (Probably because Win8 won't boot without UEFI, the HDD option wouldn't work either)

Any ideas?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
seeley

Re: Installing LMDE on an SD card

Post by seeley »

Hi!
Please first find out where Grub is installed.
My "help" (-> signature), chapter 6 gives you a hint.
Jenia

Re: Installing LMDE on an SD card

Post by Jenia »

seeley wrote:Hi!
Please first find out where Grub is installed.
My "help" (-> signature), chapter 6 gives you a hint.
I made sure to install GRUB on sdc (sda being the HDD, and sdb being an SSD). Before asking my question here I tried following some of the steps here. Needless to say that did not go well, but I did edit some files at /boot/grub, so that may be relevant...
I also tried using USB image writer on the SD to see if the SD card can be booted from at all - and it worked! The SD card booted into a live session no problem.
Of course what I want is a full blown portable OS, not a live session...

I'll post the results of the findGrub command from your guide as soon as I get access to the card again (a day or so) and redo the installation. Or dpkg --list | grep grub, assuming that would work from inside a live session?
Jenia

Re: Installing LMDE on an SD card

Post by Jenia »

findGrub output(from within live session)

Code: Select all

/dev/sda: No GRUB 00n
/dev/sda1: No GRUB 55aa
/dev/sdb: No GRUB 00
/dev/sdb1: No GRUB 00
/dev/sdc: No GRUB f7e1
/dev/sdc1: No GRUB f7e1
/dev/sdc1: No GRUB f7e1
hexdump: /dev/sdc1p1: No such file or directory
/dev/sdd: No GRUB 020
/dev/sdd1: No GRUB 00
/dev/sdd2: No GRUB 00
Note that in this context, sdc is the live medium and sdd is the SD card which I tried installing on.

dpkg --list | grep grub output

Code: Select all

ii  grub-common                                   1.99-23                           i386         GRand Unified Bootloader (common files)
ii  grub-pc                                       1.99-23                           i386         GRand Unified Bootloader, version 2 (PC/BIOS version)
ii  grub-pc-bin                                   1.99-23                           i386         GRand Unified Bootloader, version 2 (PC/BIOS binaries)
ii  grub2-common                                  1.99-23                           i386         GRand Unified Bootloader (common files for version 2)
ii  grub2-theme-mint                              1.0.9                             all          Grub2 theme for Linux Mint
Following your instructions to repair grub returns:

Code: Select all

grub-setup: error: cannot stat /media/sdd1/boot/grub/boot.img.
I cannot install grub as you instructed - mounting sdaW does not work ("special device does not exist").
I'm pretty sure I installed grub on it. I tried grub-install /dev/sdd as well as dpkg-reconfigure grub-pc(and selecting sdd).
seeley

Re: Installing LMDE on an SD card

Post by seeley »

Hi!
1.
/dev/sdd: No GRUB 020
-> Grub 1.99 is installed into the MBR of the SD card.
2.
sdaW
is not okay, because sda could be a hd / SSD or USB drive/ flash and not your SD card -> sdd !

Could you please try it again and if you have no success list all Terminal steps after "ls /media" concerning "repair Grub 2";
in my help I 'm supposing to repair Grub on a hd, so all Terms ...sda... must be replaced.
Make sure that your SD card really is sdd!

Edit:
To list devices incl. mount points, labels,...:

Code: Select all

sudo blkid -o list -w /dev/null
sudo blkid -o list -w /dev/null
Jenia

Re: Installing LMDE on an SD card

Post by Jenia »

This is from a different laptop, so in this context the SD card is sdc.

Code: Select all

sudo blkid -o list -w /dev/null
device     fs_type label    mount point    UUID
-------------------------------------------------------------------------------
/dev/sda1  ntfs    RECOVERY (not mounted)  867830E27830D2A3
/dev/sda2  ntfs    SYSTEM   (not mounted)  9E7C31B87C318C51
/dev/sda5  swap             <swap>         f9490aa8-5731-43ed-be6d-e04363b51725
/dev/sda3  btrfs            (not mounted)  ad7dbaed-dff1-4d87-809b-427f5f98ae14
/dev/sda6  ext4             /              01845667-5645-4aaa-84d0-c2b3457c7dbf
/dev/sdb1  iso9660 Linux Mint LMDE 32-bit (UP6) (not mounted) 
/dev/sdc1  ext4             /media/1c126b7b-726d-446d-9072-6a2bde0f64df 1c126b7b-726d-446d-9072-6a2bde0f64df
/dev/sdc2  swap             (not mounted)  c72dc55a-d9b8-487e-b224-428625bfe01f
So that we're on the same page, this computer's findGrub output:

Code: Select all

/dev/sda: No GRUB 020
/dev/sda1: No GRUB 55aa
/dev/sda2: No GRUB 55aa
/dev/sda3: No GRUB 00
/dev/sda4: No GRUB 00
/dev/sda5: No GRUB 00
/dev/sda6: No GRUB 00
/dev/sdb: No GRUB f7e1
/dev/sdb1: No GRUB f7e1
/dev/sdb1: No GRUB f7e1
hexdump: /dev/sdb1p1: No such file or directory
/dev/sdc: No GRUB 020
/dev/sdc1: No GRUB 00
/dev/sdc2: No GRUB 00
installing like you instructed still doesn't work:

Code: Select all

sudo mount /dev/sdcW /mnt/boot
mount: special device /dev/sdcW does not exist
Steps to repair grub...

Code: Select all

# sudo mkdir /media/sdc1
mkdir: cannot create directory `/media/sdc1': File exists
# sudo mount /dev/sdc1 /media/sdc1
# ls /media
1c126b7b-726d-446d-9072-6a2bde0f64df  cdrom  cdrom0  floppy  floppy0  sdc1
# sudo grub-setup -d /media/sdc1/boot/grub /dev/sdc
grub-setup: error: cannot stat /media/sdc1/boot/grub/boot.img.
seeley

Re: Installing LMDE on an SD card

Post by seeley »

Hi!
Sorry! Edit:
IMPORTANT: Did you boot from your live medium, as I write in my help?

Could you please post the output of - with inserted CD card of course -

Code: Select all

sudo parted - l print
lowercase "L" like list
seeley

Re: Installing LMDE on an SD card

Post by seeley »

Hi!
Meanwhile I saved my data from my SD card [ /dev/mmcblk0 ] , unmounted and formatted it and labelled partition 1 [ -> SDP1 ] with GParted.
=> In my case:

Code: Select all

seeley@lmde-notebook ~ $ sudo blkid -o list -w /dev/null
[sudo] password for seeley: 
device             fs_type  label     mount point            UUID
-------------------------------------------------------------------------------------------------
...
/dev/mmcblk0p1     ext4     SDP1      (not mounted)          6308f630-2946-4fd8-a2a4-68acc418b154
/dev/mmcblk0p2     swap               (not mounted)          dbf85b85-32a5-4a1e-8b85-ca97bf018c9a

Code: Select all

seeley@lmde-notebook /media $ sudo mkdir /media/SDP1

Code: Select all

seeley@lmde-notebook /media $ sudo mount /dev/mmcblk0p1 /media/SDP1

Code: Select all

seeley@lmde-notebook /media $ ls -l
...
drwxr-xr-x 2 root root 6 May 28 18:42 SDP1

Code: Select all

sudo blkid -o list -w /dev/null
...
/dev/mmcblk0p1      ext4        SDP1   /media/SDP1           6308f630-2946-4fd8-a2a4-68acc418b154
...

seeley

Re: Installing LMDE on an SD card

Post by seeley »

Hi!
To help we need more information - please answer all receivable questions.
The mount point of your SD card is the UUID - confusing; a better idea is to label partitions, afterwards mkdir and mount as described.
Last point: A swap partition on SD - good idea?
Jenia

Re: Installing LMDE on an SD card

Post by Jenia »

parted was not installed in the live session, so I did apt install parted first

Code: Select all

sudo parted -l print
Model: ATA SAMSUNG HM500JI (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system     Flags
 1      1049kB  16.1GB  16.1GB  primary   ntfs            diag
 2      16.1GB  16.2GB  105MB   primary   ntfs
 3      16.2GB  258GB   242GB   primary   btrfs
 4      258GB   500GB   242GB   extended
 5      258GB   260GB   2147MB  logical   linux-swap(v1)
 6      260GB   500GB   240GB   logical   ext4


Error: Invalid partition table - recursive partition on /dev/sdb.         
Ignore/Cancel? I                                                          
Model: SanDisk SanDisk Cruzer (scsi)
Disk /dev/sdb: 16.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End  Size  Type  File system  Flags


Model: Single Flash Reader (scsi)
Disk /dev/sdc: 16.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system     Flags
 2      1049kB  1075MB  1074MB  primary  linux-swap(v1)
 1      1075MB  16.0GB  15.0GB  primary  ext4
In this context...
sdb is the life medium.
sdc is the SD card.

The following still won't work:

Code: Select all

mint@mint ~ $ sudo grub-setup -d /media/SDHC/boot/grub /dev/sdc
grub-setup: error: cannot stat /media/SDHC/boot/grub/boot.img.
Last edited by Jenia on Wed May 29, 2013 4:23 am, edited 1 time in total.
M_aD
Level 4
Level 4
Posts: 204
Joined: Sun Apr 27, 2008 9:03 am
Location: Belgium
Contact:

Re: Installing LMDE on an SD card

Post by M_aD »

Installing a OS on a SD card is never a good idea because SD cards are limited on read/write cycles compared to a normal hard drive or SDD. Meaning they won't live very long, you could end up with a unusable system fast after a while (weeks or months) and you can throw it (the sd card or usb stick) away. Same as with a usb stick. At least that's what i've been told a while ago elsewhere.
Jenia

Re: Installing LMDE on an SD card

Post by Jenia »

I tried reinstalling after it was given a label, and the installer reported an error configuring GRUB, noting that it must be configured manually.

I then followed the steps to INSTALL grub, but I skipped two steps:
A separate boot partition -sdaW- must be mounted, too:

Code: Select all

sudo mount /dev/sdaW /mnt/boot
A separate home partition -sdaY- must be mounted, too:

Code: Select all

sudo mount /dev/sdaY /mnt/home
because still:

Code: Select all

sudo mount /dev/sdcW /mnt/boot
mount: special device /dev/sdcW does not exist
and same for sdcY.

However the installer did not report an error and seemed to complete successfully.
I then ran the steps to REPAIR grub - the one that didn't work before - and it didn't give an error this time.
seeley

Re: Installing LMDE on an SD card

Post by seeley »

Hi!
"sdXY" must be replaced with the current devices - so "sdaW", "sdaY" or "sdcY" won't work. Please see my "help":
To repair Grub"2"
Boot from your Mint live medium
Supposing hard disk /dev/sda and Mint root partition sdaX is not labelled
IMPORTANT: replace X 4 times in 3 commands and sda, if your hd is not identified as sda !
@ Jenia:
You are able to boot from Your SD card?
Jenia

Re: Installing LMDE on an SD card

Post by Jenia »

seeley wrote:Hi!
"sdXY" must be replaced with the current devices - so "sdaW", "sdaY" or "sdcY" won't work. Please see my "help":
To repair Grub"2"
Boot from your Mint live medium
Supposing hard disk /dev/sda and Mint root partition sdaX is not labelled
IMPORTANT: replace X 4 times in 3 commands and sda, if your hd is not identified as sda !
Note my earlier code paste:

Code: Select all

sudo mount /dev/sdcW /mnt/boot
mount: special device /dev/sdcW does not exist
I copied it from the terminal, and as you can see, I made 100% sure to write "sdc" and not "sda".
seeley wrote:@ Jenia:
You are able to boot from Your SD card?
Short answer: No.

Long answer: I can boot into a grub prompt (where is shows "grub>") on this computer if I use an SD reader, but the target computer (the one mentioned in post 1, Samsung Ultrabook NP530U3C) refuses to boot into that. The target computer simply displays it's own boot menu, showing the HDD and SD card, and selecting the SD card gives a moment with a black screen and then the boot menu again. Note that it's the computer's internal boot menu (probably associated with BIOS), not grub!

I'll try downloading that computer's manual, see if there's something I can enable/disable in the BIOS...
Jenia

Re: Installing LMDE on an SD card

Post by Jenia »

The manual doesn't mention anything. I'm stumped... :|
seeley

Re: Installing LMDE on an SD card

Post by seeley »

Hi!
The problem is: sdcW does not exist! You only can use W in sdcW after having used "mkdir" in a Terminal.

So let's start from the very beginning:
Please boot from your live medium, insert SD card and post the output of Terminal:

Code: Select all

sudo blkid -o list -w /dev/null
Do nothing else and please wait for my reply.
Last edited by seeley on Thu May 30, 2013 11:50 am, edited 1 time in total.
Jenia

Re: Installing LMDE on an SD card

Post by Jenia »

No rush - I've returned the SD card and won't have access to it until sunday.
seeley

Re: Installing LMDE on an SD card

Post by seeley »

Hi Jenia!
Writing a HOWTO you must consider as many cases as possible - concerning Grub repair, I can't know if you repair Grub on a hd, SSD, USB, SD,...; so I don't know if your device is e.g. sda or sdb,...and your parttion e.g. sda5, sdb2,.. -> so I write sdAX or sdXY,...but you can't use that notation, you must use your specific identification shown in your Terminal. (You only see e.g. sdaW if it was defined before - normally with

Code: Select all

sudo mkdir...
So please again read my post from Tue May 28, 2013 8:22 pm to understang what I mean.

Afterwards you can start with posting the output of

Code: Select all

sudo blkid -o list -w /dev/null
and we try to solve the problem step by step.
Jenia

Re: Installing LMDE on an SD card

Post by Jenia »

Is there any chance I'll be able to catch you in the IRC chatroom tomorrow?
(Apparently I can't even PM you, and step-by-step via posting will be dreadfully slow, considering the circumstances...)
seeley

Re: Installing LMDE on an SD card

Post by seeley »

Hi!
Sorry - tomorrow I' m on the way.
Locked

Return to “LMDE Archive”