Hardware – Replacing the System Disk..
My ‘system disk’ (/dev/sda) started to show bad sectors, recently, and so I decided to replace it. The disk was around 8 years old, and had been in almost-continuous use..
I have not had to do this for some considerable time, and I think the last time was in the late-90s, and using LILO! (No convoluted grub2 commands and UUIDs back then..)
I found – after some trials – that one successful way of doing this is mentioned in an article here, and thanks to Arif for the information: https://ask.fedoraproject.org/en/question/31666/how-do-you-install-grub2-on-a-replacement-hard-drive/
I created a (Fedora 23) netinst image on a USB stick, and booted from this, and ran the ‘rescue’ utility… The system only had a USB2 connection, so the utility was very sluggish, but I found that I could get a command prompt by typing alt/tab.. I mounted the ‘new’ root partition (/dev/sda2) under /mnt/sysimage (/run/media/liveuser/newdiskroot in the example), and mounted the (separate) boot partition (/dev/sda1) under /mnt/sysimage/boot.. I had decided to use btrfs for the ‘new’ root partition, but – being over-cautious – kept the boot partition as ext4..
After running the (modified) commands mentioned in the article – and remembering to update /etc/fstab – the system booted correctly..
This is – of course – rather Fedora-specific, but it is possible to get dracut on other Distros..
Robert Gadsdon. June 2, 2016.
Comments
Hardware – Replacing the System Disk.. — No Comments