How can I make a master boot record without resorting to Windows ?
Wishing to install Trisquel 7 onto a clean hard disk, I cleaned out everything and created an ext4 partition, but the Trisquel 7 Live DVD insists that there is "no defined root file system" and suggests that I "correct this from the partitioning menu."
What I've done, of course, is remove the MBR or Master Boot Record. Now the Internet insists that every operating system has (requires ?) a MBR ... but is that always a Microsoft MBR ? It seems so, as I haven't found a recipe for acquiring/creating a MBR that doesn't involve using a Windows source or backup.
Surely there is a GNU/Linux MBR facility for creating a MBR on a clean disk. Is that GRUB ? Are GRUB and MBR two terms for the same thing, or does GRUB depend on the preexistence of a MBR ?
Searching the Add/Remove Applications menu in Trisquel for "GRUB" reveals no matching applications.
I'm doing this to a USB-attached hard drive, not to the main hard drive in the computer, as I'm trying to make a Trisquel 7 installation into another computer.
What I've tried so far is to attempt the install of Trisquel 7 from the LiveDVD to the USB-attached hard drive, which always ends with the above-quoted "no root file system defined" complaint ... whether I mount the hard drive or not, and whether there's any file already in it or not.
Please point me to a coherent Trisquel (i.e., rational) explanation of the process whereby I can put a recognized master boot record onto that hard drive.
Under System Settings->Disks, select the disk you want to format, click the gear at the top-right (More Actions), and choose "Format" from that list. You can choose to set the disk up either with a master boot record, or with GPT.
But you've completely misinterpreted your problem. Your problem has nothing to do with how your disk is formatted; you just haven't chosen a root ("/") partition. If you don't understand, you might want to just let the installer partition for you (choose one of the options other than "Something Else"). It's not perfect, but it should be good enough.
Neither of the above two proposals works for me. The first fails with an error message; and the second avoids the one way in which I can install Trisquel 7 on an external USB-attached hard drive.
"Something Else" is the only way that I can install Trisquel 7 on that external hard drive, near as I can tell.
Hi!
Hmm, have you tried using "Disks"?
On 04/05/2015 08:34 PM, name at domain wrote:
> Neither of the above two proposals works for me. The first fails with an
> error message; and the second avoids the one way in which I can install
> Trisquel 7 on an external USB-attached hard drive.
>
> "Something Else" is the only way that I can install Trisquel 7 on that
> external hard drive, near as I can tell.
Before pogiako piped up, I tried this approach (unsuccessfully it would appear):
> http://debian-handbook.info/browse/stable/sect.config-bootloader.html
>
> sudo grub-install /dev/sdb
> [password]
> Installing for i386-pc platform.
> grub-install: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
> grub-install: error: embedding is not possible, but this is required for cross-disk install.
I have grub2 installed on the main Trisquel 7 OS on which I am attempting this.
As far as "Disks" is concerned, this is what transpires:
> Error synchronizing after initial wipe: Timed out waiting for object (udisks-error-quark, 0)
Searching on the term in parentheses returns mostly errors involving USB-sticks.
Mebbe "force" will do the trick:
> sudo grub-install --force /dev/sdb
> [password]
> Installing for i386-pc platform.
> grub-install: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
> grub-install: error: embedding is not possible, but this is required for cross-disk install.
Nope. No progress; install of Trisquel fails with same error message as at the start of this thread.
Another possibility: "Startup Disk Creator"
Fails because it will not let me apply it to the target partition on the USB-connected hard drive; instead, it insists on using a FAT32-formatted partition instead, as though the whole aim is to create a Windows startup disk ?
The MBR stores a list of the primary partitions and a very small program that is executed by the BIOS. There are plenty of tools to manipulate it using GNU/Linux including “fdisk”, “cfdisk”, “parted” and “gparted”. However, as already pointed, your problem is that you haven't chosen a partition to mount in “/” when installing.
Be careful when manipulating partitions and the MBR. A mistake can easily make your system unbootable if you misconfigure the bootloader (GRUB). You may have to attempt file recovery or find the partition extents if you delete partitions from the MBR; on the other hand, if you shred (set all bytes to 0 or random data) you will lose the data contained therein. That is not to say that you must be scared, only cautious and check what you are going to do before doing so.
If you are installing on a hard disk which you intend to use entirely for Trisquel, then just chose the option “use all the disk space” (I don't know the exact wording) and select the right disk instead of manually configuration partitions. Putting everything in a single partition plus swap is likely to require the least maintenance to you. If you want something more flexible, you may use LVM (and you need the netinstall image to use it), but I recommend only if you want to spend time learning that aspect of system administration.
It is unlikely that you will lose information due to a bug when installing, but it's always a possibility[1] that add to the chances of plain user mistake and therefore it is a common and good recommendation to perform a backup of your important information before installing an operating system, and also to do so periodically.
[1]: until informatics reached the state of development when the relevant software is mathematically proven correct to a specification.
Changelog 2014-04-05 22:11: Changed “problem seems to be” to “problem is” because I confirmed it while replicating the situation in a virtual machine in order to provide more detailed help.
marioxcc suggested:
> However, as already pointed, your problem seems to be that you haven't chosen a partition to mount in “/” when installing.
Here's what I've been doing:
1. Start GParted; authenticate (i.e., run with root permissions);
2. Choose "Something Else" so that I can do the next two steps;
3. Set the target as /dev/sdb1 (the first ext4 partition in my USB-connected hard drive)
4. Set the device for boot loader installation as /dev/sdb.
5. Install ... followed by the "no defined root file system" refrain.
marioxcc seems to be echoing the recommendation: "correct this from the partitioning menu" but the real problem seems to be the lack of a master boot record, and I've already found that grub-install isn't happy without support from Windows.
Isn't there an open-source master boot record available for the GNU/linux operating systems ?
I use the command line tools directly, so I can't help you with GParted-specific usage.
>Isn't there an open-source master boot record available for the GNU/linux operating systems ?
This and your other messages reflect a misunderstanding of what “master boot record” is.
Your approach is itself a typical case of the problem sometimes called “XY problem” (which is a very bad name, but I don't know of a better one): you have a real problem: that you can't install Trisquel; but you think that the cause is another (supposed) problem: that you haven't created a master boot record (which you do not know what is).
Like I told you already, the MBR is just a part of the boot code and the table of primary partitions; also, it is modified (and if it did not exist, created) as as consequence of creating partitions. You don't need to find a “an open-source master boot record available for the GNU/linux operating systems”. Since the table of partitions is specific to your setup (it is possible but extremely unlikely that it will be the same as other system), it makes no sense to try to find an existing MBR, or to put special attention to it. What you should pay attention to, is to partition the disk properly, and the MBR will be correct as a consequence.
Apparently you have selected “Try Trisquel without installing” from the installation CD, and then clicked the icon “Install Trisquel 7.0”; is that right?. In the “Installation type” dialog, what have you selected?. What have you done, apart from this?. You mentioned that you did: “1. Start GParted; authenticate (i.e., run with root permissions);”, but that is inconsistent with what you said later: “2. Choose "Something Else" so that I can do the next two steps;”; that is an option of the Trisquel graphical installer, not of GParted. Don't confuse those 2 programs. Why do you want to partition manually?. As a general rule, if you don't know why you want to change the default options, don't change them.
I have not used the graphical installer (I use the text-based installer), but common sense tells me that unless there is a good reason for not doing so, using the option “Erase disk and install Trisquel” is the more sensible approach for you.
>Here's another attempt, trying to follow marioxcc's suggestion:
No, I never suggested or would suggest that and you misunderstood what that procedure does. It has nothing to do with your problem.
It seems to me like ALL of the problems you are having are caused because you are doing things that you don't understand at all for no good reasons. If you continue with your current approach you will break your system often and eventually lose important information. It's fine to practice and see what unknown things do with informatics if you do so in an isolated environment (for instance, in a virtual machine), but not with a system you intend to use for something else than practicing.
Do not speculate about things that you do not know about (as you clearly have been doing). You will almost surely be wrong, and you will just lose your time. You may and should research what you need and do not know yet, and only then, once you are well informed, use that information when troubleshooting.
I really hope this message helps and you will take into account what I wrote. I have spent some time using the graphical installer in a virtual machine to try to figure what you are doing and more so trying to describe the situation properly.
Regards.
Here's another attempt, trying to follow marioxcc's suggestion:
Source of the procedure: http://www.av8n.com/computer/htm/grub-reinstall.htm
1. sudo mkdir /x
2. sudo grub-install --root-directory=/x /dev/sdb
Result:
> Installing for i386-pc platform.
> grub-install: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
> grub-install: error: embedding is not possible, but this is required for cross-disk install.
http://www.howtogeek.com/193669/whats-the-difference-between-gpt-and-mbr-when-partitioning-a-drive/ says:
"MBR (Master Boot Record) and GPT (GUID Partition Table) are two different ways of storing the partitioning information on a drive."
Aha. Read on:
" GPT does not have primary and logical partitions, but just partitions as GParted shows (figure 1).
" When you're formatting a hard disk in GParted and want to use GPT, just select the gpt option, as in figure 2:
" fig-2 using-gparted: Figure 2: Using GParted to format a hard disk in GPT.
"GPT has several advantages over the MBR: ..."
As I quoted above:
" When you're formatting a hard disk in GParted and want to use GPT, just select the gpt option, as in figure 2:
" fig-2 using-gparted: Figure 2: Using GParted to format a hard disk in GPT.
"GPT has several advantages over the MBR: ..."
Went back to GParted and reformatted the USB-connected hard drive using the GPT option, then tried:
> 1. sudo mkdir /x
> 2. sudo grub-install --root-directory=/x /dev/sdb
Result:
> Installing for i386-pc platform.
> grub-install: error: failed to get canonical path of `/cow'.
And of course, installing Trisquel 7 from the LiveDVD fails in the usual way.
Tried formatting with "Disks" again:
> Error setting partition type after formatting: Error setting partition flags on /dev/sdb1: Error spawning command-line `sgdisk --typecode 1:"0fc63daf-8483-4772-8e79-3d69d8477de4" "/dev/sdb"': Failed to execute child process "sgdisk" (No such file or directory) (g-exec-error-quark, 8) (udisks-error-quark, 0)
That's where it stands ...
Trisquel 7 Live DVD insists that there is "no defined root file system" and suggests that I "correct this from the partitioning menu."
What I've done, of course, is remove the MBR or Master Boot Record.
That makes no sense. Forget about the MBR. The problem is, well, that you have not defined a root file system from the partitioning menu. I do not know how the error message could be better! Just start the install over and, at the partitioning menu, define the partitions. One of them must be mounted at /. There can even be one single partition (although I would advise you to put /home in a separate partition) but, then, it must be the root partition (i.e., mounted at /). The installer will take care of writing the MBR. You do not need to worry about it.
http://www.tldp.org/HOWTO/html_single/Partition/
I myself still struggle with partioning and at the moment let installers do the work (auto-partitionning)the above guide is quite comprehensive and well done.
the installer will save you time and pain may you later try out manual multi-partitionning.
https://www.debian.org/releases/stable/i386/apcs01.html.en
Appendix C. Partitioning for Debian
Magic Banana said:
"Just start the install over and, at the partitioning menu, define the partitions. One of them must be mounted at /. "
Fine. In all this process, no one actually said where the "partitioning menu" is ... and I found it myself in the usual manner: I guessed !
After doing one other critical (?) step: I deleted the root partition in the USB-attached hard drive (sdb1) using GParted so that it was now just unallocated space. I selected that empty space and then I clicked the bold plus sign (_+_) in the little box just under the list of partitions and at the left of that table, which thereupon produced the missing partition menu.
After that, the installation of Trisquel 7 proceeded just fine, except that it was impossible to tell if Trisquel was actually going into the correct hard drive. Even when it asked my name and gave the laptop's name with my username, I wasn't yet sure whether all was copacetic. Only after rebooting _without_ the previously USB-attached hard drive plugged in to the USB port was I sure that it went OK.
Thanks to Magic Banana for this statement: "The installer will take care of writing the MBR. You do not need to worry about it."
Bear in mind that this might have worked this well because I had invoked the GPT option previous to this final push.
Tomorrow I'll see if this hard drive, now with Trisquel 7 newly installed, will work OK in the target desktop PC that I've been piecing together from various sources.
>Fine. In all this process, no one actually said where the "partitioning menu" is ... and I found it myself in the usual manner: I guessed !
The “partitioning menu” is the menu in the installer from which you modify partitions. Nobody told you and the error message is written that way because it is obvious.
About the attitude of “guessing”, I guess you didn't read my more extensive message above. Maybe you did not notice it because it doesn't appears at the bottom of the thread.
The “critical step” is that (as 3 of us and the error message told you) you need to select a root partition, one to be mounted in “/”. What's the point of asking us what to do if you are going to ignore our comments, make your own blind guesses instead, and then claim that “maybe” it worked because you manipulated options don't even understand in a way that you don't understand either?. It's nosense.
marioxcc said: "Nobody told you and the error message is written that way so because it is obvious."
"Everyone knows" means, "everyone who's a member of the club knows."
Way back in the days of 8+3 filenames, disk space was at a premium and so even text files had to be kept short. Those days are gone forever, and yet the present operating systems are full of shorthand and slang terms that folks new to the game have an awful time learning. My dear mother was born in what was Austria-Hungary, and in spite of living in the USA for more than twenty years before having me, she never learned the American idiom and was forever repeating off-color remarks (like Meryl Streep in "Sophie's Choice.)
It would be a simple matter to place a text file into a popup that could appear when hovering the cursor over that little box in the Trisquel installation menu. I still don't know (and hesitate to guess) what might happen if I were to click on the accompanying minus (_-_) sign ...
I've been struggling with the GNU/linux operating system for more than twenty years myself.
After 20 years of use you should be able to tell that “partitioning menu” means the menu which is about partitioning, and that a couple of buttons below a list labeled “+” and “-” mean adding and removing from that list, respectively. If you don't apply common sense and ignore people's advice then it is no puzzle why you have been struggling.
Trisquel requires minimal technical knowledge to install and use, but like anything worthy, it does require common sense and interest from you. Jargon (do not confuse with slang) is present in all disciplines, not just informatics; any practicer is expected to get used to it. You can look up a term you don't know in a search engine; there is even one in the installation DVD you used.
Modern software abstracts (hide from the user) a huge amount of complexity; if you want to see a tiny bit of it, take a glance at this manual about your and other CPUs or this specification about the web. However, often the more the abstraction, the less control the user has. Some things can't be abstracted because software needs the users's input to “know” what to do according to his needs. The installer offers the option to abstract partitioning or let you control it. Despite our advice (since the second reply) to let it do the partitioning for you, you insisted in doing it yourself, so you can't blame Trisquel for not hiding partitioning (but it still hides a lot compared to using “fdisk” and “mkfs.ext4”).
I really hope you reconsider your attitude of blaming others and the software for your mistake and ignoring suggestions; then using a computer will feel less like struggling. Asking for help is good, but be willing to listen to the answers, and please do a web search before asking so that you won't ask things answered thousands of times already. Put in practice these suggestions or equivalent about your attitude and way of handling informatics.
Also, check the link to “documentation” that is in the top bar in almost all Trisquel pages. The Debian and Ubuntu documentation and Wiki usually apply to Trisquel too, but they may recommend proprietary software which we don't, because it's unethical and some technical aspects are different.
The polemics were too much for the motherboard ... case ... whatever ... back in the case: intermittent power. Nuts.
At least my original question was answered: Yes, you can install Trisquel on an empty (no MBR) hard drive via USB connection.
Partitioning should not be that difficult. Here is how I partitioned my debian wheezy setup:
/ primary 1gb
/usr logical 10gb
/var logical 3gb
swap logical 8gb
/tmp logical 3gb
/home logical the rest of the hard drive (450gb or so)
hope this gives you an idea..
cheers!
/home in a separate has an obvious advantage: being able to (re)install a GNU/Linux system without touching the user data.
Putting the system on several partitions has an obvious drawback: possible mis-dimensioning. A partition that is under-dimensioned means that the partitioning schema needs to be redone when it becomes full. A partition that is over-dimensioned means disk space is wasted.
Of course, there can be advantages too. In particular, the type of the filesystem can differ from a partition to another so that it is more adapted to its usage (in particular to the size of the files in it and to the frequency of their modifications). But you do not even report the types of your filesystems.
Magic Banana said:
"/home in a separate [partition] has an obvious advantage: being able to (re)install a GNU/Linux system without touching the user data."
You betcha; that was my first task after getting Trisquel 7 installed OK. You should see the grub menu !
Alas, either the motherboard has an intermittent connection or the case is somehow shorting it out. I'll find some short stand-offs to place between the case's mounting holes and the bottom of the motherboard. Then I'll re-install Trisquel from the "new" desktop's CD/DVD reader ... but, thanks to Magic Banana' correct assurance, I now have a working hard drive. With the bare motherboard sitting on my dining room table, the hard drive with its newly installed Trisquel would not boot up, probably because it was expecting the laptop's hardware, and that wasn't there, of course. In the case, it won't even start.
With the bare motherboard sitting on my dining room table, the hard drive with its newly installed Trisquel would not boot up
See in the BIOS/EFI configuration whether booting on a USB hard drive is an option. It should be unless the computer is very old.
Followup:
That pesky motherboard (same Intel D865GLC as I'm using in a couple other successful Trisquel 7 installations) just wouldn't cooperate, even after I raised it up away from the case with some nifty standoffs, so I set it aside and got another one from a different source and then swapped out the original Pentium 4 CPU, fan & cooling block into the replacement, which cured the problem. Short version: the torso transplant saved the head. Three different power supplies helped, too ... It's really a frankenputer now, fer sher: it's composed of all leftover & recycled parts, except for a bag of screws from the 'puter store and the Windowless HDD with which I started this thread.
Then I discovered that grub couldn't wake up the Trisquel 7 installation that I had made while the HDD was plugged into a USB port on my laptop. Changing the flag on the root partition of that Trisquel 7 installation didn't revive it, so I just burned a Trisquel 7 live DVD and let it have its way with that HDD, to which I hadn't yet added any data.
Result: a painless Trisquel 7 installation in spite of all the complications related before in this thread.
One piece of advice: Be sure to look up grub's password with "sudo cat /etc/grub.d/01_PASSWORD" before moving that HDD and its installed OS onto the target desktop, 'cuz if you can't get the primary Trisquel 7 OS to boot up, you're not gonna get to the console to fix the situation. I had to take everything apart and re-marry that HDD with the laptop to retrieve grub's password.
Final result: a desktop PC with a circa 2004 MB with Pentium 4, 4GB RAM and two 320GB HDD's. Great for everything except gaming. Trisquel 7 installs painlessly with the best graphics resolution that the monitor can manage and the correct aspect ratio, all by default ... no frustrating user adjustments needed at all.
Good that you have been able to fix the issue at hand. Now, in spite of all the other paragraphs in this thread, there might actually be a number of real issues which prevents software from altering the MBR.
So first, for clearance sake, what is an MBR and what is the GPT. Both are the initial record on a disk, and indicate the following two important things: 1) how does the disk look like (what are the [primary] partitions) and if available, where to boot from.
Now GPT and MBR appear to be logically the same, yet they are not. The GPT uses what is called a protective MBR, sometimes called the GPT protected partition. Now, this really is in itself an MBR with one primary partition, the GPT. Now, there are BIOS and/or EFI firmwares which require authentication to change this part (the MBR or protective MBR).
Still, if you are updating a GPT, the BIOS won't attempt to terminate that attempt, so happily the partitioner goes. GParted, Parted, FDisk, Ubuiquity or whatever else is used by the Trisquel installer will also just happily accept the situation and rewrite the GPT. GRUB 2 at the other end, needing to write into the (protective) MBR will then fail miserably and booting into whatever partition will likewise fail.
It might be that your pesky motherboard is, in a desperate attempt of security, trying to halt you from altering the MBR in the first place.
More followups:
The "pesky motherboard" may have been an unfortunate combination of flaky power supply, rejected desktop case, and/or intermittents in the motherboard. At times I could get the power LED to come on by shorting the power switch leads to each other with a hard-drive master/slave jumper, but I also had to resort to applying a reset the same way. Then I discovered (on one lucky occasion when I succeeded in accessing the BIOS) that the BIOS had been set to restart to the "last setting" after an interruption, and I changed that BIOS setting to something less like a shell game. Often I got the power LED light to come on by pressing down on one corner of the motherboard. Eventually, after lofting the motherboard away from any chance of shorting to the case, it wouldn't show any signs of life. Too many iffy situations. The second motherboard got me off to a better start ... upon unplugging the front-case-audio connection, the power came on once & for all.
I might try plopping that pesky motherboard on the kitchen table, and supplying power, keyboard, mouse, spare hard drive, and monitor to see if it will run, out of earshot of the FCC, with no case nearby. Hate to give up on the thing - Intel's D865GLC motherboards have been good to me otherwise. The others have survived my clumsy handling of them quite well. If I get a BIOS, then I'll add the necessary CD/DVD ROM drive and proceed to shoehorn those parts into another leftover case.