Session #129 - June 1, 2018 - GPARTED & SuSE 42.3 update; CygWin/BASH continued(maybe)
from Session #129 of Linux at lunch... June 1, FRIDAY: SIMPLE ALWAYS WORKS! SITUATION: Toshiba R600 Portege laptop, 500GB drive - SuSE 42.2 - EOL. Needed to update, and low on space. RESOURCES: DVD with SuSE 42.3 Leap; 1TB SSD from recently deceased laptop; and Gparted on a USB stick. Thought I would need to use EZGig or Clonezilla... EZgig was version 2... out of date, failed... downloaded v6, but it required the hardware device... long ago deceased and disposed... Tried Clonezilla... bad disk... dug out my USB stick with Gparted that we've used in prior session to rescue systems, and dd for cloning: http://johnmeister.com/linux/Notes/Gparted-for-Recovery/ALL.html http://johnmeister.com/linux/FileSystems/rescuing-failing-drive-w-dd.html But I forgot that one can "copy" partitions with Gparted... so I tested it, and it worked.Getting the system to boot to the correct drive was a challenge... had to be careful of /dev/sda as it had the good SuSE 42.2 with MATE... attached to a USB SATA dual drive unit was the target 1TB SSD (which had a full up MINT/MATE environment on it with a corrupted MATE Menu, the files had already been copied to another 1TB SATA drive). And then of course the USB stick with Gparted (Debian Linux), which was what I needed to boot to. It took a few tries to get the correct boot device, but once Gparted started it was all good. What I ended up doing was removing the 1TB drive from the USB/SATA "toaster" and that allowed the system to find the USB stick, once the Gparted screen appeared and BEFORE it loaded its kernel, I reinserted the 1TB drive. If you boot into the Gparted kernel without both drives (source and target) in place it won't work, it needs to be registered in the kernel when started.
The process steps were: 1) boot into Gparted (disk or thumbdrive) - make sure all disks are attached 2) identify drives, e.g. /dev/sda1 swap 10GB /dev/sda2 root 138GB (SuSE 42.2) /dev/sda3 home 318GB /dev/sdb1 swap 8GB /dev/sdb2 root 989GB (Mint/Mate) /dev/sdc1 root 512M (Gparted/Debian) 3) select /dev/sdb - create partition (gpt) - yes, delete all partitions ; apply 4) select /dev/sda1 - copy ; select /dev/sdb, paste (leave the same size, 10GB for 8GB of memory is adequate for swap) 5) select /dev/sda2 - copy ; select /dev/sdb, paste (leave the same size, 138GB for the OS is adequate) 6) select /dev/sda3 - copy ; select /dev/sdb, paste - AND expand to fill the drive 998GB or whatever. 7) after being completely certain you did this right, click APPLY and wait... for what may be a long time... 8) once complete reboot the system verify it's ok... this is where the real work begins. 9) disassemble the laptop and swap the drives, making sure you keep them straight. remember, the original drive is still good and correct. 10) swap drives (YMMV), boot up to the cloned drive... good luck, you'll need it. - at this point things can get very complicated... - if your system used UUID instead of KERNEL devices (i.e. some cryptic string, vs. /dev/sda1) you will have a problem... the UUID of the device you cloned will be different... that means you'll have to edit /etc/fstab and likely go into /boot and grub.cfg and so on. - if you can't boot at this point, and you're smart enough to use OpenSuSE, you have options. 11) Assuming you were bright enough to use OpenSuSE, you have options. - you can fiddle with files, or boot up to the install media. - when booting to the SuSE Install disk, select upgrade (if you select install the disk is smart enough to realize that it's already installed, and allow you to upgrade, which isn't something that often happens with other distros... of course, YMMV.) - when doing the upgrade I always select at least one or two additional packages, by doing this I make sure the system is changed so that the boot features are also changed. 12) the system will do it's upgrade and usually fix the booting issue. - if not either dig into grub or put the old drive back in. - once the old drive is in, modify grub.cfg and /etc/fstab to show KERNEL drivers, not UUID, or you can get fancy and fake out the UUID on your system to make the new drive appear to be the old drive... confused? yeah, me too... so I ignore the warning about kernel names and go that way... however, if you swap drives around on your bus by accident, that will BITE you! be careful. once the system boots up you can restore your old repos (non-oss) and make sure everything is working. (I forgot to save my old repos... needed non-oss for virtualbox and VLC... not hard to add back in.).
SJ model Jeeps
"Jeep is America's
Mercedes, VW, and other Diesels
general tech info
purchase AMSOIL and have it
installed locally in WA at:
- Fleet Services 425.355.4440 - Everett
- Midway Auto 360.668.7111 - Clearview/Snohomish
- Northland Diesel 360.676.1970 - Bellingham