LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 06-11-2013, 11:14 AM   #1
Rexx Magnus
LQ Newbie
 
Registered: Aug 2008
Posts: 13

Rep: Reputation: 0
Bootable (portable) SD card - system updates add fixed disks to grub


I've created an encrypted bootable SD card that I can take anywhere. I have a problem when running the updates on it - often grub will redetect any fixed disks in the computer and add those to the boot menu. Sometimes it actually updates grub ON those fixed disks.

I had to originally install the SD card by booting with the drives disconnected (SD card in USB reader) - it worked fine once you rebooted with the disks reconnected. Ideally, I want to be able to use this on any computer without affecting the built in drives.

On my laptop and desktop machines, I cannot disable the drives from the bios and disconnecting the drives when I'm on my laptop is not practical.

Is there a way of making the updates to grub etc. only apply on the specific drive that I've booted off. fstab is set up to use the UUID of the partition when mounting, so that it specifically refers to the encrypted USB drive.

I was using Debian Wheezy for this, and either want to use Debian, Mint or another Debian based distro for the install, so any instructions that might be specific to Debian would be helpful.
 
Old 06-12-2013, 09:13 PM   #2
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,528

Rep: Reputation: 705Reputation: 705Reputation: 705Reputation: 705Reputation: 705Reputation: 705Reputation: 705
What are you updating?

Quote:
often grub will redetect any fixed disks in the computer and add those to the boot menu.
If you are running update-grub, that would be expected behavior.

Quote:
Sometimes it actually updates grub ON those fixed disks.
I'm not sure if I'm reading that the way you meant but I take that to mean when you update-grub on the SD card, it updates and changes the bootloader on an internal hard drive, is that what you meant? That's completely illogical. I have Ubuntu on sda5 and I can run update-grub on it and it will add any new systems to the grub.cfg file in Ubuntu but has no effect on the primary system on another partition which has Grub in the mbr which is also expected behavior.

Last edited by yancek; 06-12-2013 at 09:15 PM.
 
Old 06-13-2013, 01:47 AM   #3
Rexx Magnus
LQ Newbie
 
Registered: Aug 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by yancek View Post
What are you updating?



If you are running update-grub, that would be expected behavior.



I'm not sure if I'm reading that the way you meant but I take that to mean when you update-grub on the SD card, it updates and changes the bootloader on an internal hard drive, is that what you meant? That's completely illogical. I have Ubuntu on sda5 and I can run update-grub on it and it will add any new systems to the grub.cfg file in Ubuntu but has no effect on the primary system on another partition which has Grub in the mbr which is also expected behavior.
It happened when I did a dist-upgrade, and I think that several packages that updated the initrd were updated, along with grub. Maybe the the latter happened (your interpretation is correct) and it added the fixed disks to the SD card's configuration files. I don't want that to happen.

It may be that I can experiment with it a bit more to see exactly what happens to the system, but I definitely don't want it adding fixed disks to the bootable sd card's boot menu. I think the last time it did, it wouldn't boot when the card was put in another machine.
 
Old 06-13-2013, 08:30 AM   #4
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,528

Rep: Reputation: 705Reputation: 705Reputation: 705Reputation: 705Reputation: 705Reputation: 705Reputation: 705
Quote:
It happened when I did a dist-upgrade
In that instance I would expect update-grub to be run and any other operating systems on any disks it can see would be added to the grub.cfg file. You could easily then delete any unwanted entries from grub.cfg. Don't see how that would prevent it from booting later.
 
Old 06-13-2013, 12:13 PM   #5
Rexx Magnus
LQ Newbie
 
Registered: Aug 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by yancek View Post
In that instance I would expect update-grub to be run and any other operating systems on any disks it can see would be added to the grub.cfg file. You could easily then delete any unwanted entries from grub.cfg. Don't see how that would prevent it from booting later.
I'll have to give it another go and see what happens, then.

I'll also have to try installing with the drive plugged in, and the fixed disks connected.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Tutorial: GRUB vs. the Inodes: Who Needs a Bootable System, Anyway? LXer Syndicated Linux News 2 08-07-2008 12:47 AM
how to format the hard disks(removable & fixed) ? himy Linux - Newbie 11 09-09-2007 06:23 PM
Multiple bootable distros on one portable hdd? GustavTheMushroom Linux - Newbie 1 09-03-2007 03:14 PM
Multiple bootable (live) distros on one portable hdd? GustavTheMushroom Linux - Software 8 09-03-2007 10:06 AM
RHEL 3: Steps of expanding file system (add new SCSI disks) to existing SW RAID & LVM atman1974 Linux - General 2 01-12-2006 09:49 PM


All times are GMT -5. The time now is 06:07 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration