kkdao Posted August 29, 2020 Posted August 29, 2020 I followed a guide to install a system on my Rockpro64 but something happened where I had to reinstall it. However, when I reflashed the ubuntu server image and tried re-installing the system it got an error pertaining to one of my disk volumes. So I'm wondering how to re-format and remount and redo the LVM volume my SSD. Any help or tips would be greatly appreciated!
Werner Posted August 29, 2020 Posted August 29, 2020 If you want to start from scratch and have no important data on the device you could simply kill the partition table with dd and start over. 1
kkdao Posted August 29, 2020 Author Posted August 29, 2020 I do not have anything important so yes I can start from scratch no problem. Sorry, so if my SSD is at /dev/nvme0n1 how do I use dd with it?
Werner Posted August 29, 2020 Posted August 29, 2020 You could do something like dd if=/dev/zero of=/dev/nvme0 bs=512 count=1 where nvme0 should be the device itself and not the first partition. You can verify this beforehand with fdisk -l. After that you may have to restart the board to make the "new" partition table recognized.
kkdao Posted August 30, 2020 Author Posted August 30, 2020 Okay I will try that thanks, but just to clarify what are you referring to that I can verify beforehand? Because when I do 'fdisk -l' I see that it says nvme0n1 not nvme0. Alright though I will keep in mind that I may have to restart.
Werner Posted August 30, 2020 Posted August 30, 2020 29 minutes ago, kkdao said: nvme0n1 not nvme0. I wasn't sure about that because it looked to me that nvme0 is the device itself and n1 is the first partition but maybe there was not partition on it beforehand...
kkdao Posted August 30, 2020 Author Posted August 30, 2020 ah okay i see, well when i do 'dd if=/dev/zero of=/dev/nvme0n1 bs=512 count=1' i get: 1+0 records in 1+0 records out 512 bytes copied, 0.00090138 s, 568 kb/s does that look right, how can i check i that i wiped it?
Werner Posted August 30, 2020 Posted August 30, 2020 Do another fdisk -l and check if the partition table is empty.
kkdao Posted August 30, 2020 Author Posted August 30, 2020 i see the disk there at the top of the output but not sure what to look for as it seems like there is still space on it, i see: Disk /dev/nvme0n1: 953GB, 1024209543168 bytes, 2000409264 sectors Disk model: Sabrent Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes
Werner Posted August 30, 2020 Posted August 30, 2020 What's the full output of fdisk -l? I assume it is incomplete.
kkdao Posted August 30, 2020 Author Posted August 30, 2020 Disk /dev/nvme0n1: 953.89 GiB, 1024209543168 bytes, 2000409264 sectors Disk model: Sabrent Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/mtdblock0: 16 MiB, 16777216 bytes, 32768 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/mmcblk2: 14.46 GiB, 15518924800 bytes, 30310400 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x0ca53e42 Device Boot Start End Sectors Size Id Type /dev/mmcblk2p1 32768 30007295 29974528 14.3G 83 Linux Disk /dev/zram0: 50 MiB, 52428800 bytes, 12800 sectors Units: sectors of 1 * 4096 = 4096 bytes Sector size (logical/physical): 4096 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/zram1: 1 GiB, 1073741824 bytes, 262144 sectors Units: sectors of 1 * 4096 = 4096 bytes Sector size (logical/physical): 4096 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/mapper/rockpro64-project: 500 GiB, 536870912000 bytes, 1048576000 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes
Werner Posted August 30, 2020 Posted August 30, 2020 Aight, looking good so far. Now do partitioning or LVM or whatever you want. The SSD is empty.
kkdao Posted August 30, 2020 Author Posted August 30, 2020 (edited) well now i need to re-format, remount and redo the LVM volume on my SSD drive because there is still data on there. here is what i was following for reference: https://notmandatory.org/rockpro64-pt2/ Edited August 30, 2020 by kkdao
kkdao Posted August 31, 2020 Author Posted August 31, 2020 (edited) specifically how to remount, because I tried installing the system again, but I get a mount error: rockpro64 systemd[1]: var-lib-bitcoind.ount: Job var-lib-bitcoind.mount/start failed with result 'dependency' Edited August 31, 2020 by kkdao
Werner Posted August 31, 2020 Posted August 31, 2020 Um, just follow the mentioned guide again at the poing when you started messing with the ssd?
kkdao Posted August 31, 2020 Author Posted August 31, 2020 I did that haha, but I still get errors related to the systemd.service and the mount point with the drive:( so I need to figure out how to completely start from scratch and go back to default settings on the board.
Werner Posted September 1, 2020 Posted September 1, 2020 The easiest way would be to get another sd card, burn a fresh image on it and start over. This way you wont loose anything since you keep the existing sd card and take a look whenever needed.
kkdao Posted September 1, 2020 Author Posted September 1, 2020 I've actually tried re-flashing the eMMC with Etcher (which is what I'm using instead of SD card) with a new image of the Ubuntu OS, but I still get errors when trying to run the system again. After looking deeper into the errors I have figured out there is an issue with my drive still being mounted somehow. So when I do 'e2fsck -f /dev/nvme0n1' or 'fsck.ext4 /dev/nvme0n1' I get back: ext2fs_open2: bad magic number in super-block e2fsck: Superblock invalid, trying backup blocks... e2fsck: Bad magic number in super-block while trying to open /dev/nvme0n1 The superblock could not be read or does not describe a valid ext2/ext3/ext4 filesystem. If the device is valid and it really contains an exy2/ext3/ext4 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock: e2fsck -b 8193 <device> or e2fsck -b 32768 <device> but when I try running e2fsck with the suggested alt superblock i get: /dev/nvme0n1 contains a LVM2_member file system I did all this in root FYI (sudo -) after SSHing into my system. Another thing I probably should've mentioned at the beginning was WHY this all occurred in the first place and it's because I accidentally unplugged the power cord from the outlet while the system was on and running. So that's why the mount point is somehow messed up seemingly.
Recommended Posts