Showing posts with label grub. Show all posts
Showing posts with label grub. Show all posts

gentoo second install x86 btrfs debian

Now that my Gentoo Phase 2 has been put on hold for the near future, I have to satisfy this itch to install gentoo on my main laptop. Having it on my primary rig, would allow me to use it more often than pulling out my backup system.

My blind first attempt, at a gentoo install, gave me a lot of confidence in the gentoo community. This second attempt substantially lessens the time/aggro I spent previously installing gentoo.

grub rescue btrfs ubuntu

to play more seriously with yet another distro, i needed to install it. so i had some fun resizing/moving partitions around to clear some freespace for a new partition. during this, the partition numbering changed.

now i can't boot ubuntu's btrfs partition. i didn't understand why, till i discovered that partition numbers are hardcoded into the grub boot record.. even though grub cfg contains only labels or uuids. tsk tsk! yet another reason why i seem to be going off grub2 bloatware.

mbr in linux

fdisk /mbr
ever used the above in dos? but this doesn't work in linux. there are times when i have a need for this. i usually install bootloaders on specific partitions than on the mbr.

dd can be used for such requirements. the following will wipe your mbr clean

# dd if=/dev/zero of=/dev/xxx bs=446 count=1
where xxx is your disk.

how/where do i use this? i have been playing with many different os for a long time. every os wants to install their own bootloader into the mbr. but, we can't really have that, can we? not if we want them to exist simultaneously on the same disk.

i always install the bootloader on the same partition as the os, and wipe the mbr clean. then use fdisk to make a partition active and reboot to load that os. an os could do whatever with its bootloader and not bother me. this method can also be used to play with multiple bootloaders, each on a separate partition. i arrived at this method, after much grief from trashed bootloaders.

caution: just in case, make a backup of your mbr, before you wipe it.
# dd if=/dev/xxx of=xxx-mbr.raw bs=446 count=1

and restore it, like so
# dd if=xxx-mbr.raw of=/dev/xxx

Bootable USB

I used mkdosfs to create a FAT16 filesystem. I want to use this stick anywhere.

Then I used dd to wipe the MBR.

I wanted to use grub on this stick. But, try as I might, I couldn't get it to boot on the PCs that I have.

Finally, I settled down with the restricted version of syslinux. Now, my usb stick seems to boot most PCs.

Voila! I have my entire desktop on a keyring, and can carry with me everywhere.

As long as the owner of any computer allows me, I stick this into a USB port, and boot to my own desktop. It looks the same, and acts the same, no matter where I am or what hardware I use, if it boots... And I have been able to boot most PCs, laptops, thin clients, etc. Plus, an added bonus is that nothing "on" that PC is disturbed!

most viewed