s_gowdar
Posts: 7
Joined: Tue Sep 19, 2023 4:40 pm

Unable to create bootable SSD image of existing SD card

Tue Sep 19, 2023 5:00 pm

Hello,

I have a SSK 128gb flash drive (SSD) https://www.amazon.com/SSK-Super-Fast-T ... B09HK6M8CC that I am trying to use as my primary drive instead of my current SD card (Samsung Pro endurance 32gb).

The imaged SSD never successfully boots and the only output on screen is "Something went wrong..." and flashing _ in the next line.

Info about my system:
Linux raspberrypi 5.15.32-v8+ #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022 aarch64 GNU/Linux
Raspberry pi 4 Model B Rev 1.5 (4gb)
Has the lite version, being used as a kiosk device

I would like to keep working off of this image since I have a lot of things configured as I need them and it would be prohibitively time consuming to redo.

Things I have tried:
1. Simplest one: Image the SD card using Win32DiskImgr and write to the SSD using the same.
2. Write using Raspi Imager after erasing the SSD using the inbuilt function.
3. Update the bootloader just in case, mess around with boot order etc.
4. Use dd to make the copy while the SSD is mounted as an external drive.
5. Try tools like rpi-clone for the copy.
6. Use the USB 2 port instead of 3.
7. Update the kernel using apt update upgrade and try 1-6 again.

Is there something obvious that I am missing here? TIA.

User avatar
neilgl
Posts: 6841
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near The National Museum of Computing

Re: Unable to create bootable SSD image of existing SD card

Wed Sep 20, 2023 8:18 am

Have you tried RonR’s image file utilities?

User avatar
B.Goode
Posts: 15852
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Unable to create bootable SSD image of existing SD card

Wed Sep 20, 2023 10:50 am

s_gowdar wrote:
Tue Sep 19, 2023 5:00 pm

Is there something obvious that I am missing here? TIA.

The SD Card Copier utility available in the Accessories section of the Desktop GUI 'Start' menu.
Beware of the Leopard

aBUGSworstnightmare
Posts: 8386
Joined: Tue Jun 30, 2015 1:35 pm

Re: Unable to create bootable SSD image of existing SD card

Wed Sep 20, 2023 1:06 pm

B.Goode wrote:
Wed Sep 20, 2023 10:50 am
s_gowdar wrote:
Tue Sep 19, 2023 5:00 pm

Is there something obvious that I am missing here? TIA.

The SD Card Copier utility available in the Accessories section of the Desktop GUI 'Start' menu.
+1

tick 'new partition UUID' and then copy it from uSD to SSD

s_gowdar
Posts: 7
Joined: Tue Sep 19, 2023 4:40 pm

Re: Unable to create bootable SSD image of existing SD card

Wed Sep 20, 2023 3:29 pm

I have the non GUI version, is there a git repo for SD Card Copier utility?

I tried rpi-clone as an alternative.. as mentioned

Also I need to add. Using any of the methods I mentioned to clone to another SD card works and boots perfectly. Just not the SSD.

New image of Raspbian works fine as well to write to the SSD, boots fine as well.


Is this related to setting/changing the UUID in all the config and /etc/fstab files?

s_gowdar
Posts: 7
Joined: Tue Sep 19, 2023 4:40 pm

Re: Unable to create bootable SSD image of existing SD card

Wed Sep 20, 2023 5:13 pm

Update: tried using usb-boot as well. Same result. Says "Something went wrong" on screen with _ flashing in the next line...

aBUGSworstnightmare
Posts: 8386
Joined: Tue Jun 30, 2015 1:35 pm

Re: Unable to create bootable SSD image of existing SD card

Wed Sep 20, 2023 6:12 pm

5.15.32-v8 is quite an old kernel. Why not flash recent OS to your SSD and then copy your data to it?

s_gowdar
Posts: 7
Joined: Tue Sep 19, 2023 4:40 pm

Re: Unable to create bootable SSD image of existing SD card

Wed Sep 20, 2023 6:18 pm

aBUGSworstnightmare wrote:
Wed Sep 20, 2023 6:12 pm
5.15.32-v8 is quite an old kernel. Why not flash recent OS to your SSD and then copy your data to it?
Just tried updating the SD card using apt update, upgrade again and making a clone of that to the SSD. Same result. Is that the same as what you are talking about?
Last edited by s_gowdar on Wed Sep 20, 2023 6:32 pm, edited 1 time in total.

aBUGSworstnightmare
Posts: 8386
Joined: Tue Jun 30, 2015 1:35 pm

Re: Unable to create bootable SSD image of existing SD card

Wed Sep 20, 2023 6:29 pm

Well, have you actually checked your SSD? I've not checked aour link as I'm not clicking first posters links. But would check the SSD if you keep having issues with it. Some controllers are simpla not supported!

Never had any issues using SD card copier for creating duplicates of the boot drive on uSD/NVMe or USB thumb drives

s_gowdar
Posts: 7
Joined: Tue Sep 19, 2023 4:40 pm

Re: Unable to create bootable SSD image of existing SD card

Wed Sep 20, 2023 6:33 pm

aBUGSworstnightmare wrote:
Wed Sep 20, 2023 6:29 pm
Well, have you actually checked your SSD? I've not checked aour link as I'm not clicking first posters links. But would check the SSD if you keep having issues with it. Some controllers are simpla not supported!

Never had any issues using SD card copier for creating duplicates of the boot drive on uSD/NVMe or USB thumb drives
I have tried with this SSK brand and also the Corsair Voyager GTX, both act the same.

User avatar
HawaiianPi
Posts: 7865
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Unable to create bootable SSD image of existing SD card

Thu Sep 21, 2023 12:57 am

Was your original SD card OS installed by NOOBS?

If yes, then that's your problem (NOOBS isn't USB boot compatible).

One of RonR's scripts can extract an OS from a NOOBS install and write it to another card or USB drive as a stand-alone OS (without NOOBS).
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups, and where is that annoying music coming from?

s_gowdar
Posts: 7
Joined: Tue Sep 19, 2023 4:40 pm

Re: Unable to create bootable SSD image of existing SD card

Mon Sep 25, 2023 3:55 pm

HawaiianPi wrote:
Thu Sep 21, 2023 12:57 am
Was your original SD card OS installed by NOOBS?

If yes, then that's your problem (NOOBS isn't USB boot compatible).

One of RonR's scripts can extract an OS from a NOOBS install and write it to another card or USB drive as a stand-alone OS (without NOOBS).
It's not...

User avatar
butchkemper
Posts: 217
Joined: Sat Jul 22, 2017 8:03 pm
Location: Sachse, Tx. Dallas is a western suburb of Sachse.

Re: Unable to create bootable SSD image of existing SD card

Tue Sep 26, 2023 3:29 am

neilgl wrote:
Wed Sep 20, 2023 8:18 am
Have you tried RonR’s image file utilities?
I can also recommend you use RonR's image file utilities. They work great.

Here is the description file for the USB-Boot program which will copy a SDcard to a SSD.

Code: Select all

Running Raspbian on USB Devices : Made Easy

A recurring topic of discussion is how to configure and reliably run Raspbian on a USB flash drive, USB hard drive, or USB SSD instead of an SD card.

A Raspberry Pi 3B+ has a native USB boot mode (this mode has to be manually enabled by setting an OTP bit on a Raspberry Pi 3B).  This native USB boot mode has serious compatibility issues.  A bootcode.bin file is available for older Raspberry Pi models.  Unfortunately, both of these approaches have serious limitations and once working, can easily be broken by simply plugging in an additional USB storage device.

The easiest and most reliable way to run Raspbian on a USB device with any Raspberry Pi is to leave an SD card containing Raspbian in place, but use it only for starting Raspbian that is residing on a USB device.  While setting up such a configuration is not rocket science, it can be confusing to a newcomer or someone unfamiliar with Linux internals.  In an effort to simplify the task, I've created the attached script named 'usb-boot' to automate the process.

If usb-boot is running on a Raspberry Pi 4, usb-boot first prompts: 'Use SD card to boot the USB device?'

If 'No' is selected, the SD card will not be altered and the direct USB boot capability of the Raspberry Pi 4 will be used.

[NOTE: The direct USB boot capability of the Raspberry Pi 4 requires an updated bootloader and firmware: https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711_bootloader_config.md]

If usb-boot is running on a Raspberry Pi 3B+ or a Raspberry Pi 3B with its OTP bit set, usb-boot first prompts: 'Use SD card to boot the USB device (recommended)?'

If 'No' is selected, the SD card will not be altered, but booting the USB device may be limited and/or unreliable as described above.

usb-boot then presents a list of available USB mass storage devices and prompts: 'Select the USB mass storage device to boot'

Use the arrow keys on your keyboard to navigate to the desired device and press the spacebar to select it.  Then use the tab key to navigate to the 'Ok' or 'Cancel' button and press the return key.

usb-boot will then prompt: 'Replicate BOOT/ROOT contents from /dev/mmcblk0 to /dev/sdX?'

/dev/mmcblk0 is the SD card and /dev/sdX is the USB device.

Select 'No' if the USB device already has Raspbian on it and you wish to use it (nothing will be copied).

Select 'Yes' if you want to copy the Raspbian on your SD card to the USB device (everything will be copied).

If you select 'Yes', usb-boot will then prompt: 'Select the partition table type to use (MBR = 2TB Maximum)'

usb-boot will then prompt: 'All existing data on USB device /dev/sdX will be destroyed!' and ask: 'Do you wish to continue?'

If you select 'Yes', the copy will begin.  The time required for this process will depend on the amount of data on your SD card and the speed of your storage devices.

usb-boot will then complete the configuration process and warn you of any potential conflicts it detects.

When usb-boot has finished, you should be able to reboot and be running Raspbian on the USB device (first power off and remove the SD card if not using the SD card to boot the USB device).

=====

sdc-boot provides a convenient way to select which attached device will be booted.

Usage syntax is:

sdc-boot [ /dev/sdX2 | /dev/mmcblk0p2 | hhhhhhhh-02 | hhhhhhhh-hhhh-hhhh-hhhh-hhhhhhhhhhhh ]

/dev/sdX2 is a USB device

/dev/mmcblk0p2 is the SD card

hhhhhhhh-02 | hhhhhhhh-hhhh-hhhh-hhhh-hhhhhhhhhhhh is a device identified by its PARTUUID

If no device is specified, the currently selected boot device will be displayed.

=====

GPT partition tables are necessary for devices whose size is over 2TB.

mbr2gpt converts an MBR partition table on a USB device to a GPT partition table, as well as optionally expanding the ROOT partition and enabling booting via an SD card.
mbr2gpt converts any size USB device, including SD cards placed in a USB adapter.

!!! DO NOT PROCEED UNLESS YOU HAVE A RELIABLE BACKUP OF THE DEVICE BEING CONVERTED !!!
!!! INITIAL TESTING SHOULD BE PERFORMED ON A USB DEVICE CONTAINING EXPENDABLE DATA !!!

Usage syntax is:

mbr2gpt /dev/sdX

mbr2gpt will prompt for permission to perform the following optional functions:

1. Convert the USB device to use GPT partition tables

2. Expand the ROOT partition to use all available space

3. Set the SD card to boot the USB device

=====

set-partuuid displays or changes the ROOT partition PARTUUID on a device.

Usage syntax is:

set-partuuid device [ hhhhhhhh-02 | hhhhhhhh-hhhh-hhhh-hhhh-hhhhhhhhhhhh | random ]

device may be /dev/sdX2 or /dev/mmcblk0p2

If no partuuid is specified, the current ROOT partition PARTUUID will be displayed.

Butch

s_gowdar
Posts: 7
Joined: Tue Sep 19, 2023 4:40 pm

Re: Unable to create bootable SSD image of existing SD card

Wed Sep 27, 2023 8:50 pm

Update on this:

I came across something that hinted my boot issue might be due to the boot splash I'm using: viewtopic.php?t=276545

It uses initramfs to display a boot image early in the boot sequence

How do I undo the changes made by loading the initramfs.img file in boot?

I've already tried removing it, and undoing the changes to cmdline.txt and config.txt - that just leads to kernel not loading.

here is my cmdline.txt and and config.txt if it helps:
console=serial0,115200 root=PARTUUID=3d00304c-02 rootfstype=ext4 fsck.repair=yes rootwait consoleblank=0 vt.global_cursor_default=0 elevator=deadline
vc_mipi_ov9281.sensor_mode=1
cma=128M
//////////////////////////////////////////

# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
hdmi_safe=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=9

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

# Automatically load overlays for detected cameras
camera_auto_detect=1

# Automatically load overlays for detected DSI displays
display_auto_detect=0
disable_touchscreen=1

# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d
max_framebuffers=2
dtparam=i2c_vc_baudrate=50000
dtoverlay=vc4-kms-dsi-7inch

# Run in 64-bit mode
arm_64bit=1

# Disable compensation for displays with overscan
disable_overscan=1

[cm4]
# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required
# (e.g. for USB device mode) or if USB support is not required.
otg_mode=1

[all]

[pi4]
# Run as fast as firmware / board allows
arm_boost=1

[all]
dtparam=i2c_vc=on
disable_touchscreen=0
dtoverlay=i2c-rtc,ds3231

# RoboJar stepper drive sleep pin to low,enable pin to nopull - allow bootup
#gpio=22=op,dl
gpio=17=np

#Robojar disable console on boot
disable_splash=1
avoid_warnings=1
boot_delay=0
#initramfs initramfs.img
dtoverlay=disable-bt
dtoverlay=inno_mipi_ov9281

#dtoverlay=gpio-poweroff,gpio_pin=22,timeout_ms=10000
#dtoverlay=gpio-poweroff,gpio_pin=18,active_low=1
#dtoverlay=gpio-fan,gpiopin=5,temp=60000
#gpu_mem=128

aBUGSworstnightmare
Posts: 8386
Joined: Tue Jun 30, 2015 1:35 pm

Re: Unable to create bootable SSD image of existing SD card

Thu Sep 28, 2023 4:41 am

s_gowdar wrote:
Wed Sep 27, 2023 8:50 pm
..
here is my cmdline.txt and and config.txt if it helps:
console=serial0,115200 root=PARTUUID=3d00304c-02 rootfstype=ext4 fsck.repair=yes rootwait consoleblank=0 vt.global_cursor_default=0 elevator=deadline
vc_mipi_ov9281.sensor_mode=1
cma=128M
//////////////////////////////////////////
..
Your kernel command line is hopefully a single line only!
The way yoi've posted it here it's not!

Make use of code tags for better readability!

Return to “Advanced users”