From Petitboot to MMC

Post Reply
jordy
Posts: 7
Joined: Tue Jul 02, 2024 5:27 pm
languages_spoken: english
ODROIDs: N2+
Has thanked: 1 time
Been thanked: 1 time
Contact:

From Petitboot to MMC

Post by jordy »

Hello,

I currently have an Odrioid N2+ running on Debian 12. I installed it by using Petitboot with the "netboot_default" command, and the installation worked perfectly.
Now I flipped the switch on the board, so that I can use mmc instead of Petitboot, but that doesn't work.

Is there a guide or can somebody guide me as to how to change booting from Petitboot to mmc? I tried to search for one, but couldn't find it.

User avatar
tobetter
Posts: 13379
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 1033 times
Been thanked: 2328 times
Contact:

Re: From Petitboot to MMC

Post by tobetter »

When you install Debian/Ubuntu using Netboot Installer from Petitboot, it's assumed that you will run Petitboot and it won't install the boot loader to a storage. Therefore you need to install the bootloader to MMC, this makes you to perform extra work.

Firstly, start your Debian 12 from Petitboot and get into the shell.
Secondly, run sudo apt install u-boot-odroidn2 that installs the boot loader.
Lastly, flip back the boot select switch to MMC and do replug the power plug to your N2Plus.

This will let your MMC have the boot loader and can start your Debian without Petitboot.

jordy
Posts: 7
Joined: Tue Jul 02, 2024 5:27 pm
languages_spoken: english
ODROIDs: N2+
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: From Petitboot to MMC

Post by jordy »

That didnt work. When I ran that command, the sytem mentioned that it was already installed and has the latest version.

User avatar
tobetter
Posts: 13379
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 1033 times
Been thanked: 2328 times
Contact:

Re: From Petitboot to MMC

Post by tobetter »

jordy wrote:
Tue Jul 02, 2024 9:27 pm
That didnt work. When I ran that command, the sytem mentioned that it was already installed and has the latest version.
Ah...then, please try this command sudo dpkg-reconfigure u-boot-odroidn2 and flip the boot select switch to MMC again.

jordy
Posts: 7
Joined: Tue Jul 02, 2024 5:27 pm
languages_spoken: english
ODROIDs: N2+
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: From Petitboot to MMC

Post by jordy »

tobetter wrote:
Wed Jul 03, 2024 9:59 am
jordy wrote:
Tue Jul 02, 2024 9:27 pm
That didnt work. When I ran that command, the sytem mentioned that it was already installed and has the latest version.
Ah...then, please try this command sudo dpkg-reconfigure u-boot-odroidn2 and flip the boot select switch to MMC again.
That does a bit more :). After flipping the switch, I get the following:
Gave up waiting for suspend/resume device
Gave up waiting for root file system device. Common problems:
- Boot args (cat /proc/cmdline)
- Check rootdelay= (did the system wait long enough?)
- Missing modules (cat /proc/modules; ls /dev)
Alert! /dev/disk/by/uuid/xxx-xxx-xxx-xxx-xxx does not exist. Dropping to shell!

BusyBox v1.35.0 (Debian 1:1.35.0-4+b3) built-in shell (ash)
Enter 'help' for a list of built-in commands.

(initramfs)

What can I do?

User avatar
tobetter
Posts: 13379
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 1033 times
Been thanked: 2328 times
Contact:

Re: From Petitboot to MMC

Post by tobetter »

jordy wrote:
Wed Jul 03, 2024 5:04 pm
tobetter wrote:
Wed Jul 03, 2024 9:59 am
jordy wrote:
Tue Jul 02, 2024 9:27 pm
That didnt work. When I ran that command, the sytem mentioned that it was already installed and has the latest version.
Ah...then, please try this command sudo dpkg-reconfigure u-boot-odroidn2 and flip the boot select switch to MMC again.
That does a bit more :). After flipping the switch, I get the following:
Gave up waiting for suspend/resume device
Gave up waiting for root file system device. Common problems:
- Boot args (cat /proc/cmdline)
- Check rootdelay= (did the system wait long enough?)
- Missing modules (cat /proc/modules; ls /dev)
Alert! /dev/disk/by/uuid/xxx-xxx-xxx-xxx-xxx does not exist. Dropping to shell!

BusyBox v1.35.0 (Debian 1:1.35.0-4+b3) built-in shell (ash)
Enter 'help' for a list of built-in commands.

(initramfs)

What can I do?
Did you install the OS to eMMC or SD card?
Long rootdelay= is not required for eMMC or SD card since they are already initiated as a block device when a kernel is loaded.
What's the output of commands lsblk and ls /dev/disk/by-uuid?
You can try an image flash to SD card directly instead of Netboot Install, the image for ODROID-N2* are uploaded here in the link.
https://ppa.linuxfactory.or.kr/images/r ... /bookworm/

jordy
Posts: 7
Joined: Tue Jul 02, 2024 5:27 pm
languages_spoken: english
ODROIDs: N2+
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: From Petitboot to MMC

Post by jordy »

OS is installed on eMMC

lsblk cannot be found but blkid works.
output: /dev/mmcblk01 UUID:xxx-xxx-xxx-xxx pttype: "gpt"

"by-uuid" is not a directory or file in my case
I do see:
by-id
by-path
by-diskseq

Flashing a new image has to be my last option since I also did a bunch of configuration on the OS already

User avatar
tobetter
Posts: 13379
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 1033 times
Been thanked: 2328 times
Contact:

Re: From Petitboot to MMC

Post by tobetter »

jordy wrote:
Wed Jul 03, 2024 8:18 pm
OS is installed on eMMC

lsblk cannot be found but blkid works.
output: /dev/mmcblk01 UUID:xxx-xxx-xxx-xxx pttype: "gpt"

"by-uuid" is not a directory or file in my case
I do see:
by-id
by-path
by-diskseq

Flashing a new image has to be my last option since I also did a bunch of configuration on the OS already
I can guess why if you selected partition type to GPT while installing. Amlogic CPU does not support GPT since region of low level firmware is sitting in between GPT partition table. If so, the partition table for the OS installation have done through Netboot Installer is damaged after running "dpkg-reconfigure u-boot-odroidn2" that write a boot loader to sectors overlapped to GPT partition table.
These users thanked the author tobetter for the post:
jordy (Mon Jul 08, 2024 6:27 pm)

jordy
Posts: 7
Joined: Tue Jul 02, 2024 5:27 pm
languages_spoken: english
ODROIDs: N2+
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: From Petitboot to MMC

Post by jordy »

tobetter wrote:
Wed Jul 03, 2024 9:15 pm
jordy wrote:
Wed Jul 03, 2024 8:18 pm
OS is installed on eMMC

lsblk cannot be found but blkid works.
output: /dev/mmcblk01 UUID:xxx-xxx-xxx-xxx pttype: "gpt"

"by-uuid" is not a directory or file in my case
I do see:
by-id
by-path
by-diskseq

Flashing a new image has to be my last option since I also did a bunch of configuration on the OS already
I can guess why if you selected partition type to GPT while installing. Amlogic CPU does not support GPT since region of low level firmware is sitting in between GPT partition table. If so, the partition table for the OS installation have done through Netboot Installer is damaged after running "dpkg-reconfigure u-boot-odroidn2" that write a boot loader to sectors overlapped to GPT partition table.
I do not remember selecting GPT. I made an image of the OS, so I can revert the changes we made if this issue can be fixed in a different way.

jordy
Posts: 7
Joined: Tue Jul 02, 2024 5:27 pm
languages_spoken: english
ODROIDs: N2+
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: From Petitboot to MMC

Post by jordy »

Is it possible to create boot manually? On this website https://wiki.odroid.com/odroid-n2/softw ... ce#bootini it is mentioned that the boot.ini file can be edited.

User avatar
tobetter
Posts: 13379
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 1033 times
Been thanked: 2328 times
Contact:

Re: From Petitboot to MMC

Post by tobetter »

jordy wrote:
Thu Jul 04, 2024 4:38 pm
Is it possible to create boot manually? On this website https://wiki.odroid.com/odroid-n2/softw ... ce#bootini it is mentioned that the boot.ini file can be edited.
What exactly do you mean by manually? Is the OS booting issue resolved?

jordy
Posts: 7
Joined: Tue Jul 02, 2024 5:27 pm
languages_spoken: english
ODROIDs: N2+
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: From Petitboot to MMC

Post by jordy »

I thought there was a way to create a new boot by manually creating files.
I found a new solution to fix my booting issue which is to convert GPT to MDR as described here https://superuser.com/questions/1250895 ... osing-data, and I ran dpkg-reconfigure u-boot-odroidn as mentioned by you

Thank you for your help.
These users thanked the author jordy for the post:
tobetter (Fri Jul 05, 2024 11:38 pm)

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 1 guest