Thread with 38 posts
jump to expanded postlmao my plan to quadruple the storage space on my pc is being thwarted by the fact the usb nvme ssd dock i bought only has a usb-c connector
i'm… gonna have to use my gf's laptop to do the ssd cloning ahahaha
turns out in 2024 having a computer with only usb-a ports is a liability. all my adapters and hubs only go in the usb-a to usb-c direction. i never thought it would happen!
like to me usb-c is still that thing you have on laptops and usb-a is the Serious one, and i do not buy hubs with usb-c ports on them because everything i want to connect is usb 2.0 or, rarely, usb 3.0
next hurdle: why does my ubuntu usb flash drive crash every time i try to boot it on my gf's laptop?
answer: it has an nvidia gpu. log in with x windows instead of wayland. lmfao
oh shit you can pass 'status=progress' as an argument to dd and it'll actually give you periodic transfer status updates i wish i knew this before
1TB (932GiB) copied in 2306s, that's not bad
advantages of this ship-of-theseus'd disk content being MBR: dd'ing the old ssd to the new one Just Works
disadvantages: this new ssd is 4TB. guess what the max size for an MBR partitioned disk is??? (it's less,,,,)
followed the first four steps of https://askubuntu.com/a/1315273 to convert the MBR disk to GPT (windows's tool for this refuses to do it on a non-empty disk), let's see if this hosed the windows install; hoping startup repair can fix it
startup repair didn't fix it, i guess it was too cursed. i'm instead installing windows 8.1 with some product key i found online (my burned windows 10 dvd has rotted but my windows 8.1 one is still good), since i know that'll create a usable gpt windows bootloader setup
disk partitioning and bootloaders are so goddamn arcane
installing windows 8.1 is so nostalgic, i miss when microsoft weren't evil
hello from the last good version of windows. i missed this so goddamn much. windows 8.1 was a strange creature but it had the prettiest desktop theme and windows 10 just threw it away ;_;
(only installed it to unfuck the boot setup, won't be actually using it except for funsies)
and hello again from windows 10! i did need to do a little manual fixing up from the windows 8.1 side; with its bootlader installed, i could go into the windows 8.1 recovery command prompt and do bootrec /rebuildbcd
to make it find and add windows 10 to the boot list ^^
as a "computers person" i do not know how to solve the problem correctly the first time, what i do have is an endless list of strange tactical maneuvers that might solve a problem and an ability to prioritise them
This is so accurate
@hikari and having a borderline pathological determination to “solve it”.
@hikari reminded me of a Taken-copypasta :3
@hikari This is so uncanny.
@sounddrill Us fixing our device trees.
@hikari Solve a problem..."correctly"? Is that a thing? :)
@hikari So true. I think what annoys about first-line support is that, because they’ve been trained and not had practical experience, they all use the same sorting algorithm, regardless of the situation. I think this explains Greenspun's tenth rule … we all eventually hit, “well in lisp what I’d do is …”
This may even explain my friends who I think are brilliant. They have better sorting algorithms and a few extra tactics :).
@hikari Windows at least managed to really simplify repairing the bootloader with bcdboot
– you just need to know that the command is there (there's also bcdedit
, which lets you manipulate the bootloader, but that is really arcane).
@hikari You'll have to recreate the Windows bootloader if you used gdisk (Windows has a tool that can convert MBR to GPT which also automatically writes the new bootloader – it's called mbr2gpt
, and you can run it from install media).
What you need to do:
- first make an EFI system partition (ESP) and format it to FAT32, it should be 100-300 MB in size; then boot any recent Windows install medium, and once it's booted press Shift+F10 – this will give you a command prompt.
- run
diskpart
, typelis dis
(which will list all disks in your machine), thensel dis X
(replace X with your NVMe drive number);lis par
(shows partitions),sel par X
(replace X with ESP number),assign
(assigns a drive letter to ESP, since it doesn't have it by default);lis vol
(lists drive letters, you should now see which drive letter is your Windows partition, and which drive letter is ESP);exit
(return to cmd.exe) - verify Windows partition drive letter with
dir Y:
- finally write the Windows bootloader with
bcdboot Y:\windows /s Z: /f UEFI
(Y: is your Windows partition, Z: is your ESP) - reboot with
wpeutil reboot
, and Windows should now boot
@jernej__s that probably would've worked! but i'm doing my own weird thing now instead
@jernej__s (i just saw it too late; i was trying to puzzle it out in the windows 8.1 install disk command prompt, but the fact my efi partition wasn't correctly formatted seemingly doomed me)
@hikari You can format from diskpart – after the partition is selected, format fs=fat32 quick
.
@hikari this is where I wish I'd kept notes of things I've done. I have a vague memory of doing an MBR to GPT conversion years ago. It would have been using the Windows tooling though.
The context was a HP laptop that after a firmware upgrade could then support UEFI/GPT and had a little-used Windows 7 on it. The internal drive size wasn't a factor.
I was already running Linux from USB anyway, but only as MBR, so that let me start testing UEFI methods - ergo
https://dev.to/geraldew/ubuntu-linux-installation-to-a-usb-external-drive-with-efi-boot-46pj
@hikari that‘s fixable! you can often in-place convert to gpt and then resize!
@hikari Use gptfdisk (gdisk) to convert MBR to GPT.
With Linux my preferred way to clone to a new drive is to create the partitions anew anyway, and then rsync the data; this also lets you format the NVMe drive to 4k sectors if it supports them (check with smartctl -c /dev/nvme0
, if there's 4096 listed under Supported LBA Sizes
, you can reformat with nvme format -l1 /dev/nvme0n1
; technically this will also let you use MBR with drives up to 16 TB, though I wouldn't recommend it).
@hikari I had a 4 TB HDD that was factory formatted with an MBR partition table. I was surprised. I think it worked because it used 4 KB sectors instead of the usual 512 byte ones.
@mgedmin oh god have i had less than ideal disk performance because the disk is still using 512B sectors oh no
@hikari Probably not? I think it only matters for interpreting partition start/stop offsets. I'm sure Linux is using 4KB blocks anyways.
@hikari Much better than getting 20 MB/s when cloning to a new computer with OEM NVMe SSD :)
@hikari That's a new one for me – I usually ran while :; do sleep 10; killall -USR1 dd
in another terminal to get progress.
@jernej__s yeah i'm used to that song and dance but this is a lot nicer
@hikari ah, one of those linux program things where i’m simultaneously “hey, this is neat” and “why is this not on by default”
LB:
Aaaaaaaaah it's true!