Failed Boot following Hard Disk Failure and Replacement

Getting your soundcard to work, using Debian on non-i386 hardware, etc

Failed Boot following Hard Disk Failure and Replacement

Postby Loci.Cantos » 2018-12-20 22:26

I'm using Debian 9.5 Stretch
I had a disk (1tb) mounted as /home/myuname/x1. The x1 disk failed. The disk's data is unimportant. But, I do need more space.
Ergo, I got a new disk (4tb); I intended to replace the disk and use gparted to intialize and partition the new disk but, I have been unable to re-enter the gui.

Upon boot, following grub, I am automatically placed in emergency mode (I suspect init 2, with no external services). I logged-in as root. I deleted the /home/myuname/x1 directory. Rebooted, then successfully reestablished the mount point using the same name /home/myuname/x1. Then I attempted to mount /dev/sda /home/myuname/x1. No Joy.

I haven't partitioned the disk, only initialized it as a gpt disk. Since it has no partitions (e.g, sda1 -system disk is sdb) I can't get it to mount. gparted would make quick work of this but since I cannot access the gui and can only log in in emergency mode, I cannot use gparted.

Still, I don't understand why a failed mount point in my home directory -a non-system data disk- would cause the whole os to fail into emergency mode. I want to access the gui to fix this problem. Any suggestions for entering the gui (init 5)?
Loci.Cantos
 
Posts: 22
Joined: 2018-08-03 15:39

Re: Failed Boot following Hard Disk Failure and Replacement

Postby Segfault » 2018-12-21 00:41

Well, in Linux there are tools and there are GUI frontends to these tools. Note, you do not need the GUI to use the tools. But you can't use the GUI without tools.
Now, you do not mount partitions, you mount filesystems. Filesystems reside on hard drive, in case there is two or more filesystems in one drive you need to wrap them into partitions. Thus, the simplest case is when you want to use the whole drive for one filesystem, just create it, no partitioning needed.
Code: Select all
mkfs.ext4 /dev/sdX

Where sdX is the drive you want to use. Replace X appropriately.
Now you can mount /dev/sdX. Wasn't rocket science, was it?
Segfault
 
Posts: 914
Joined: 2005-09-24 12:24

Re: Failed Boot following Hard Disk Failure and Replacement

Postby Loci.Cantos » 2018-12-21 00:54

Your sarcasm is unnecessary, and it's unproductive. If you can't be civil, please don't respond to my posts.

Also, your reply was not useful to me. I asked about accessing the gui, you didn't answer my question.
Loci.Cantos
 
Posts: 22
Joined: 2018-08-03 15:39

Re: Failed Boot following Hard Disk Failure and Replacement

Postby Segfault » 2018-12-21 00:56

Loci.Cantos wrote:Your sarcasm is unnecessary, and it's unproductive. If you can't be civil, please don't respond to my posts.

Also, your reply was not useful to me. I asked about accessing the gui, you didn't answer my question.

Your wish is granted. :D
Segfault
 
Posts: 914
Joined: 2005-09-24 12:24

Re: Failed Boot following Hard Disk Failure and Replacement

Postby Loci.Cantos » 2018-12-21 01:12

That's the spirit. It's good that you concede professionalism up front, if that's your inclination; it isn't for everyone. Three cheers for transparency.
Loci.Cantos
 
Posts: 22
Joined: 2018-08-03 15:39

Re: Failed Boot following Hard Disk Failure and Replacement

Postby bw123 » 2018-12-21 04:29

The post doesn't make a lot of sense, especially "mount /dev/sda /home/myuname/x1. No Joy."

You can't mount /dev/sda because it's the device node for the disk, not the partition with a filesystem on it.

I'd think if you want help, you could post your /etc/fstab and the output of fdisk -l (blkid is good too) so maybe something will jump out and someone will see what's going on. Long stories are hard to read, just the facts from a terminal. In code tags is nice.

If you have to use gparted, that's cool, it's probably on one of the live disks? or a rescue cd or something.
User avatar
bw123
 
Posts: 3787
Joined: 2011-05-09 06:02

Re: Failed Boot following Hard Disk Failure and Replacement

Postby p.H » 2018-12-21 13:09

Loci.Cantos wrote:Still, I don't understand why a failed mount point in my home directory -a non-system data disk- would cause the whole os to fail into emergency mode.

Because the mount is present without the option "nofail" in /etc/fstab, so the system considers it is mandatory for proper operation.

Segfault wrote:when you want to use the whole drive for one filesystem, just create it, no partitioning needed.
Code: Select all
mkfs.ext4 /dev/sdX

I advise against such practice. It can lead to confusion. Creating a partition table and a partition, even if it uses all the space, is less confusing. Did you notice that even USB sticks come with a partition table ?
p.H
 
Posts: 1081
Joined: 2017-09-17 07:12

Re: Failed Boot following Hard Disk Failure and Replacement

Postby Loci.Cantos » 2018-12-21 21:08

bw123 wrote:The post doesn't make a lot of sense, especially "mount /dev/sda /home/myuname/x1. No Joy." You can't mount /dev/sda because it's the device node for the disk, not the partition with a filesystem on it.

I'd think if you want help, you could post your /etc/fstab and the output of fdisk -l (blkid is good too) so maybe something will jump out and someone will see what's going on. Long stories are hard to read, just the facts from a terminal. In code tags is nice. If you have to use gparted, that's cool, it's probably on one of the live disks? or a rescue cd or something.


Thanks for your response bw123. That's right. I was acknowledging my sketchy memory when I refered to needing sda1 wich is correct but not complete. I'm just getting my feet wet again with 'nix. It's been a while. Your /etc/fstab suggestion is definitely useful, but I'm really just trying to get back into the gui at this moment. Thanks for your suggestions. Every piece of the puzzle helps to reignite the memory.
Loci.Cantos
 
Posts: 22
Joined: 2018-08-03 15:39

Re: Failed Boot following Hard Disk Failure and Replacement

Postby Loci.Cantos » 2018-12-21 21:25

p.H wrote:Because the mount is present without the option "nofail" in /etc/fstab, so the system considers it is mandatory for proper operation.


Perfect. Thank you. I'm pretty sure this is precisely what I am looking for. I'll edit /etc/fstab and apply the "nofail" option to the line for that mount. Better yet, I'll remove the reference try a reboot, then run gparted, then I'll ensure and reinitiate a line for the new drive. I was concerned it might have something to do with the registration of the drive with a specific [system] serial number and I think that threw me from pursuing it properly. I remember mounting it with a particular UUID(?) I think. I'm slowly getting back to the cl progs and apps. but I'm presently still in that phase where my memory is not practiced -and the systems have changed enough- so that I question myself. Also, I havent found a good installation reference sheet that I can use for each installation, which would have helped.

Segfault wrote:when you want to use the whole drive for one filesystem, just create it, no partitioning needed.
Code: Select all
mkfs.ext4 /dev/sdX

I advise against such practice. It can lead to confusion. Creating a partition table and a partition, even if it uses all the space, is less confusing. Did you notice that even USB sticks come with a partition table ?[/quote]
Yes, I have noticed that. And yes, I agree about not mounting the whole drive that way. Also, I want 4 partitions for this disk.

Thanks again, p.H, I appreciate it.
Last edited by Loci.Cantos on 2018-12-22 12:31, edited 1 time in total.
Loci.Cantos
 
Posts: 22
Joined: 2018-08-03 15:39

Re: Failed Boot following Hard Disk Failure and Replacement

Postby Loci.Cantos » 2018-12-22 07:18

Indeed I am back on my dsktop and all problems have been resolved. Thanks, p.H.
Loci.Cantos
 
Posts: 22
Joined: 2018-08-03 15:39

Re: Failed Boot following Hard Disk Failure and Replacement

Postby p.H » 2018-12-22 08:17

Beware : you did not set quote tags correctly in your previous post.
p.H
 
Posts: 1081
Joined: 2017-09-17 07:12


Return to Hardware

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable