LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-04-2016, 09:28 AM   #1
Old-T
LQ Newbie
 
Registered: Feb 2016
Posts: 3

Rep: Reputation: Disabled
Ubuntu 15.10 won't boot if a remove unused discs


I have an Ubuntu 15.10 running on a MSI B75MA-P45 motherboard with a number of connected SATA discs. (plus one external USB-disc)
I have a small 200 GB as boot disc, one 250 GB which I have emptied and two 3TB discs for media. (plus one small 80 GB disc that doesn't even show up on my system).
Anyway, the two 80GB and 250 GB are not used so I want to remove them to reduce the heat in the box.
My problem is that when I remove them, my systems fails to boot and I get stuck in a boot menu with several options of older kernels to boot with, none of will boot though.
The only way I can boot my system is to reconnect the two drives again
This starts to drive me nuts!
Does anyone heard of this before and can point me in a direction for a solution?

// T
 
Old 02-04-2016, 09:43 AM   #2
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669

Rep: Reputation: 498Reputation: 498Reputation: 498Reputation: 498Reputation: 498
Quote:
The only way I can boot my system is to reconnect the two drives again
Your system uses the boot sector of either the 80Gb or 250Gb. Check which. You can tell it by removing only one of the two, which of them boots.

The clean solution for this is to re-install the boot loader to the disk you wanted to dedicate, then can you only remove the two small disks and continue booting with the new bootloader at the dedicated disk. If you are using grub then grub-install it to /dev/sda<dedicated> hard drive. Then "update-grub" to make it aware of available bootable kernels. When it is done... Remove the two hard drives, and... Reboot.

Hope that helps. Goodluck.

Last edited by malekmustaq; 02-04-2016 at 09:44 AM.
 
Old 02-04-2016, 09:44 AM   #3
Gary Baker
Member
 
Registered: Mar 2007
Location: Whitsett,NC
Distribution: Slackware 14.1 and MINT 17.1
Posts: 105

Rep: Reputation: 3
What boot manager are you using? Or are you using the USB or Cd?
 
Old 02-05-2016, 03:32 AM   #4
Old-T
LQ Newbie
 
Registered: Feb 2016
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Gary Baker View Post
What boot manager are you using? Or are you using the USB or Cd?
grub 2.0. No cd or usb
 
Old 02-05-2016, 06:08 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,923

Rep: Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319
try to reinstall grub bootloader onto your boot disk (I have a small 200 GB as boot disc) and tell bios to use that to boot.
 
Old 02-05-2016, 07:02 AM   #6
Soadyheid
Senior Member
 
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,673

Rep: Reputation: 487Reputation: 487Reputation: 487Reputation: 487Reputation: 487
My thoughts...

All your disk mounts are held in fstab, when you disconnect a disk and try and reboot the system without it, it'll hang trying to mount a non-existent disk. You'll need to unmount your two drives and comment them out of fstab before shutting down, removing them and rebooting.

Play Bonny!

 
Old 02-05-2016, 03:16 PM   #7
Pyrotech72
Member
 
Registered: Jan 2016
Location: Tennessee
Distribution: several, but trying to get away from systemd while keeping KDE and KVM
Posts: 45

Rep: Reputation: 11
If you change what is mounted as / or /boot or /usr in the fstab, it will be overridden by initrd. Solution is mkinitrd
 
Old 02-06-2016, 05:41 AM   #8
Soadyheid
Senior Member
 
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,673

Rep: Reputation: 487Reputation: 487Reputation: 487Reputation: 487Reputation: 487
@ Pyrotech72

Quote:
Anyway, the two 80GB and 250 GB are not used so I want to remove them to reduce the heat in the box.
From this I take that the Op doesn't have /, /boot or /usr on either of the two disks. Will initrd still overide fstab?

Play Bonny!

 
Old 02-06-2016, 06:36 AM   #9
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
I have another possible explanation: The system is identifying drives by node "for example /dev/sda1" and because the other drives are removed these have changed. So the system boots to GRUB then GRUB can't find anything to boot to because it's looking in the wrong place. First things I'd do is check that fstab is using labels or UUIDs rather than the node. It's still possible there will be an issue with GRUB but it's worth a try.
 
1 members found this post helpful.
Old 02-06-2016, 10:17 AM   #10
Pyrotech72
Member
 
Registered: Jan 2016
Location: Tennessee
Distribution: several, but trying to get away from systemd while keeping KDE and KVM
Posts: 45

Rep: Reputation: 11
Quote:
Originally Posted by Soadyheid View Post
@ Pyrotech72



From this I take that the Op doesn't have /, /boot or /usr on either of the two disks. Will initrd still overide fstab?

Play Bonny!

Those three are mounted with the information in initrd. (It has to know where / is to find fstab.) Hopefully, initrd doesn't search by node. I don't yet know enough about it to know whether it ever would.

Quote:
Originally Posted by 273 View Post
I have another possible explanation: The system is identifying drives by node "for example /dev/sda1" and because the other drives are removed these have changed. So the system boots to GRUB then GRUB can't find anything to boot to because it's looking in the wrong place. First things I'd do is check that fstab is using labels or UUIDs rather than the node. It's still possible there will be an issue with GRUB but it's worth a try.
Yes, the fstab is the first place to check. Try that first, along with making sure grub is installed on the desired device. Then only if we have to we'll see what we can do about initrd.
 
Old 02-08-2016, 01:39 AM   #11
Old-T
LQ Newbie
 
Registered: Feb 2016
Posts: 3

Original Poster
Rep: Reputation: Disabled
I don't know if you can help me out here, but this is what my fstab looks like:

# / was on /dev/sda2 during installation
UUID=2b96cae3-ec03-4137-ade5-cded72fc182a / ext4 errors=remount-ro 0 1

# /boot/efi was on /dev/sda1 during installation
UUID=D954-A1A4 /boot/efi vfat defaults 0 1

# swap was on /dev/sda3 during installation
UUID=9075da08-c6a0-4ff7-84c4-6f0ea12ed1e4 none swap sw 0 0

# second disk
/dev/sdb1 /media/Filmer ext4 defaults 0 2

sda1, sda2 and sda3 are on the same physical disc

sdb1 is the one I want to remove (or sdb to be more precise since all partitions are removed from that disk) so I can remove that entry from the fstab, right?

The big problem I have is that the 80GB disc doesn't appear anywhere, neither in Ubuntu nor in BIOS.

// T
 
Old 02-08-2016, 01:43 AM   #12
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Your fstab is using UUIDs so that looks fine. Yes, you could comment out the entry for sdb1 in fstab -- it could also just be that the boot process is failing because it can't mount that drive which happens sometimes.
 
Old 02-08-2016, 08:28 AM   #13
Pyrotech72
Member
 
Registered: Jan 2016
Location: Tennessee
Distribution: several, but trying to get away from systemd while keeping KDE and KVM
Posts: 45

Rep: Reputation: 11
Quote:
Originally Posted by 273 View Post
Your fstab is using UUIDs so that looks fine. Yes, you could comment out the entry for sdb1 in fstab -- it could also just be that the boot process is failing because it can't mount that drive which happens sometimes.
agreed.

# second disk
#/dev/sdb1 /media/Filmer ext4 defaults 0 2
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to remove unused old kernel images on Ubuntu LXer Syndicated Linux News 0 09-13-2015 05:12 AM
[SOLVED] How do i safely remove unused icons from dash ubuntu 14.04 stwesh Linux - General 2 04-19-2015 07:47 PM
remove unused / orphan packages keratos Linux - Software 5 09-04-2008 01:01 PM
Ubuntu won't boot after it tells me to remove install. disc to finish installation Baddox Ubuntu 2 07-16-2005 10:05 AM
how to remove unused installations shyam_d_sundar Linux - Newbie 2 05-15-2004 07:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 11:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration