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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-02-2024, 01:47 PM
|
#1
|
Senior Member
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint v21.3 & v22.x with Cinnamon
Posts: 1,797
Rep: 
|
seeking HOWTO fix a bootable HDD
Colleagues,
How do I modify an HDD so that it no longer thinks that it is bootable?
I have a removable HDD that used to hold a full Linux Mint (v19.x) I want to use this drive for other things but it holds several partitions that I don't want to clobber.
I was able to use gparted to remove the various Linux partitions that are not wanted. When I try to boot the workstation from power off, things get tangled in the bootable parts of this drive and those of base workstation. The result is that the box fails to boot.
I seek two sets of information: - Is there some way to force power on boot to ignore this drive?
- Is there some way to remove the boot details from the partition table so that workstations won't get confused in the future?
I don't coonsider myself a linux wizard* though I have used linux for many years. I've never mastered using GRUB or GRUB2 with a keyboard. I don't feel comfortable using update grub either.
I am willing to learn,
Thank you in advance,
~~~ 0;-/ Dan
Follow-Up:
I've tried every form of one-time-boot that I could find. The workstation is a ThinkPad X220. The "external drive" is a module installed into the Lenovo docking station. The drive has a GPT partition table. I do not use Secure Boot.
NOTE: The workstation boots and runs Mint v21.2 without trouble absent this drive.
When the boot fails, I get something like the following:
Code:
DMAR: [Firmware Bug]: No firmware reserved region can cover this
RMRR: [ hex ] contact BIOS vendor for fixes
... TPM chip errors
You are in emergency mode. After logging in type "journalctl -xb" to view
system logs. "systemctl reboot" to reboot, "systemctl default" or "exit"
to boot into default mode.
Press ENTER for maintenamce
(or press Control-D to continue)
_______________________________________
* wizard — If you remember Fantasia and the Sorcerer's Apprentice, I know where the wizard keeps his hat and I've learned how to swim. (^o^)
Last edited by SaintDanBert; 01-02-2024 at 02:13 PM.
|
|
|
01-02-2024, 02:14 PM
|
#2
|
Senior Member
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
|
If this is an MBR style bootloader, you can delete the MBR bootloader without affecting the partition table with this:
Code:
dd if=/dev/zero of=/dev/sdQ bs=440 count=1
Replace sdQ with the device you wish to modify. Don't get it wrong!
But since you say you're not comfortable with "update grub", this is ... uhh ... well this is scarier than simple old update grub. And I'm not sure whether it applies with UEFI so ...
I dunno ... maybe don't do this until you try other things first. It's a very low level way of accomplishing this task, and if you mess anything up you could FUBAR your partition table ... even corrupt data on the partitions themselves ... not pretty stuff.
Instead, the first thing I would do is go into your BIOS settings and edit the hard drive boot priority. Depending on the BIOS, this should fix you right up.
Risk level = almost zero.
Second thing I would try is grub-install ... something like:
Code:
grub-install /dev/sdQ
Basically, instead of just erasing the bootloader, you overwrite it with a bootloader "pointed" to your currently active installation. This assumes you boot up to your desired installation, and then use grub-install to install the MBR bootloader on the other drive. That way, it doesn't matter which drive the BIOS decides to boot from, it'll still get pointed to the GRUB installation on the desired drive.
Risk level = very low, but it's also possible to get confused later on troubleshooting boot issues since you won't necessarily be sure which drive it's booting from and you might get confused updating the bootloader in one drive but not the other.
|
|
1 members found this post helpful.
|
01-02-2024, 02:16 PM
|
#3
|
Member
Registered: Jan 2022
Location: Hanover, Germany
Distribution: Slackware
Posts: 312
Rep: 
|
Quote:
Originally Posted by SaintDanBert
Colleagues,
How do I modify an HDD so that it no longer thinks that it is bootable?
|
man dd
man gdisk
|
|
|
01-02-2024, 03:52 PM
|
#4
|
LQ Guru
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 11,386
|
You should be able to select the drive on which you have an installed OS (not the Mint you refer to) in the BIOS firmware boot options. If that drive is set to first boot priority and has a bootable OS, you should have no problem. You haven't indicated what you do have and what you do want as far as operating systems on the same or other drive nor whether you are using an EFI install of Mint and your other OS, Legacy/MBR The information you have posted is not really helpful to get any specific help. You might try getting boot repair from the link below and running it using the 2nd option to Create BootInfo Summary. That would post a lot of detailed, specific and useful information. You can do it from Mint or any Ubuntu derivative 'live' usb.
https://help.ubuntu.com/community/Boot-Repair
Last edited by yancek; 01-02-2024 at 03:53 PM.
|
|
|
01-02-2024, 04:05 PM
|
#5
|
LQ Guru
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, OS/2, others
Posts: 6,496
|
Remove the boot flag from the GPT removable. This may be all that's needed. If it's not, and the GPT removable has an ESP partition, try either removing the content from its ESP's EFI directory, or reformatting its ESP, or removing its ESP partition (and possibly wiping the space it occupied).
|
|
1 members found this post helpful.
|
01-02-2024, 04:18 PM
|
#6
|
Senior Member
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
|
Quote:
Originally Posted by SaintDanBert
Colleagues,
I've tried every form of one-time-boot that I could find. The workstation is a ThinkPad X220. The "external drive" is a module installed into the Lenovo docking station. The drive has a GPT partition table. I do not use Secure Boot.
|
Assuming you're using EFI, enter the system setup utility. - Use [Tab] to select "Startup".
- Select "Boot".
- Select the entry for Linux Mint from the list. Press [Delete] to remove it from the boot order.
- Press [F10] to save and exit.
Hopefully that is the only Mint you have installed, and Mint gave its EFI entry a meaningful name. If you have multiple installations of Mint and just want to get rid of this one, things get a little more in depth.
|
|
1 members found this post helpful.
|
01-03-2024, 12:45 PM
|
#7
|
Senior Member
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint v21.3 & v22.x with Cinnamon
Posts: 1,797
Original Poster
Rep: 
|
Quote:
Originally Posted by goumba
Assuming you're using EFI, enter the system setup utility. - Use [Tab] to select "Startup".
- Select "Boot".
- Select the entry for Linux Mint from the list. Press [Delete] to remove it from the boot order.
- Press [F10] to save and exit.
|
As I understand, I have these options at power-up: - press the blue ThinkVantage button
- press the F12 key
- press ESC when Mint shows its splash screen
I do not find a way to alter the "boot order" as is days of olde.
F12 key gives me a dialog showing disk devices in some order. I can arrow up-doown to select one to boot from. If select my {supposed good} drive, I get the error that I reported above. I don't see any way to alter the order so that a failed selection will roll over to a different known-good disk.
ThinkVantage takes me into a Setup session. Again, no way to alter "boot order".
Thanks in advance,
~~~ 0;-Dan
|
|
|
01-03-2024, 03:41 PM
|
#8
|
Senior Member
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
|
Quote:
Originally Posted by SaintDanBert
As I understand, I have these options at power-up:
I do not find a way to alter the "boot order" as is days of olde.
F12 key gives me a dialog showing disk devices in some order. I can arrow up-down to select one to boot from. If select my {supposed good} drive, I get the error that I reported above. I don't see any way to alter the order so that a failed selection will roll over to a different known-good disk.
ThinkVantage takes me into a Setup session. Again, no way to alter "boot order".
|
Interesting, as my X220t allows me to do so.
When the Lenovo logo shows, I press F1, which I just mash repeatedly because you know, timing. This takes me into setup ("ThinkPad Setup", looks like an oldschool BIOS Setup).
I also get the prompt "Press Enter to interrupt normal boot...", which when pressed, gives me options - F1 for the Setup utility
- F10 for diagnostics
- F12 for a temporary boot device menu
At the top in Setup,
Code:
MAIN CONFIG DATE/TIME SECURITY STARTUP RESTART
(My mistake, I said use TAB, one must use Left/Right to select.)
Another interesting thing is if you select the supposedly good boot entry with the drive connected you get an error, and no error with it disconnected. Are you sure you are in fact choosing the "good" entry?
If you still can't get into Setup to modify startup we can do it with EFIBootMgr.
Run, as root, efibootmgr.
This will give you your boot entries, for the command below
Code:
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000,0003,0001
Boot0000* opensuse-secureboot HD(1,GPT,)/File(\EFI\opensuse\shim.efi)
Boot0001 UEFI: ST500DM002-1BD142 PciRoot(0x0)/Pci(0x1f,0x2)/Sata(0,65535,0)/HD(1,GPT,)AMBO
Boot0003* MacOS (Clover) HD(1,GPT,)/File(EFICLOVERCLOVERX64.efi)
Use this to rearrange the entries, putting the good first, using the numbers obtained above. Example
Code:
efibootmgr -o 3,1,0
Once you get that right, you can leave it alone, or delete unnecessary entries.
Last edited by goumba; 01-03-2024 at 03:53 PM.
|
|
|
01-03-2024, 05:14 PM
|
#9
|
LQ Veteran
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,843
|
As has already been mentioned there isn't enough information to give any advice.
With linux installed on both an external and internal drive the problem can be any number of things. As has already been suggested post the output of boot-repair info script.
|
|
|
All times are GMT -5. The time now is 04:08 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|