Upgrade Grub to Grub-pc

During upgrade of Lenny to Squeeze I run into an an issue with upgrading grub to grub2. My 4x2Tb drivers were created using GDP partition. As a result of the upgrade the grub-pc had an issue with my gpt partition. If you receive any of these errors you might be in a similar situation. The fix is pretty easy, so hopefully this will guide you through it.

grub-installer: grub-setup: warn: This GPT partition label has no BIOS
Boot Partition; embedding won’t be possible!

or

grub-installer: grub-setup: error: Embedding is not possible, but this

is required when the root device is on a RAID array or LVM volume.

or

grub loading...
no module name found

or

After restart I can only see “GRUB>”.

(If you have above please read the whole post, and especially the “debug” portion.)

I’ve started from Debian cd (rescue) mode. Then I’ve assembled my raid partition (sdb1,sdc1,sdd1) and
executed into shell of my lvm root group mapper_xyz_root. From there I run “upgrade-from-grub-legecy”

**Long story short.  It seems as the because I am using 4 x 2TB drivers and all 4 were
created using GPT partition table, and my computer/mother board was
purchased before 2010 it does not support GPT EFI, so grub needed more
space then MBR allowed, and was telling me no module found because it
didn’t have enough space to be installed.

Steps:
1. First I tried running the “grub-install /dev/sda” I would get:

grub-installer: grub-setup: warn: This GPT partition label has no BIOS
Boot Partition; embedding won’t be possible!

and
grub-installer: grub-setup: error: Embedding is not possible, but this
is required when the root device is on a RAID array or LVM volume.

I found this post:
<http://www.shuvoovuhs.com/linux/grub-installation-issue-with-2-tb-hdd-gpt-requires-bios-boot-partition/>
which said ( *have to* create a BIOS Boot Partition).

2. Reading up on it I concluded that my motherboard does not support
GPT EFI and therefore I do indeed need that partition:
http://en.wikipedia.org/wiki/BIOS_Boot_partition

3. Now since I only have one boot partition on /dev/sda1 (100mb) I had
199.9GB free. I decided to create a partition right after my 100mb. In
rescue mode cd I installed parted (in case its not installed)
aptitude install parted
then proceeded to install my new partition.
parted /dev/sda print
parted /dev/sda unit MB print
##this showed partion 1 as (31.4kb to 100MB)
parted /dev/sda
mkpart biosboot 100MB 101MB
##above created partition 2
set 2 bios_grub on
##Above enabled the bios grub partition

Then I did grub install and it successfully installed. (I rebooted and
it worked.

I hope you have enough room to create a new partition. This should help you out. Most time took to research why I  “HAVE TO CREATE BIOS BOOT PARTITION”, and how to use “parted” to create a new partition, since none of the fdisk tools work with GPT partition table just yet. Enjoy. See the debug portion for how to get additional information out of your system.

Debug: More details :

In the process of upgrading from debian lenny amd64 to debian squeezy amd64 I was able to successfully upgrade to kernel 32 and new udev as Debian Release notes suggest. Then after reboot I followed with apt-get dist-upgrade.

Everything went fine, but towards the end I was asked to upgrade to
grub-pc. During this choice I was asked to specify mbr to install new
boot loader. I’ve selected my a wrong driver. Instead of selecting “/dev/sda” I’ve selected a different drive. (Always select the first hard drive in the list if you are not sure) (I thought it was “flash” drive that I have used before to hold my “boot” partition, but on this machine my boot parition was on  /dev/sda1″

After restart I can only see “GRUB>”.
At this point I should have tried starting the system by issueing few grub commands. More on it shortly.


While Recovering from grub-pc install failure. I’ve started from cd
(rescue) mode. I then assembled my raid partition (sdb1,sdc1,sdd1) and
executed into shell of my lvm root group mapper_xyz_root. From there I
run “upgrade-from-grub-legecy” and this time I’ve selected my usb and
sda to install grub.

Still no lock.

Then I tried “update-grub”

Now I get “grub loading…
no module name found”

What should I do now? I’ve logged in with rescue cd again and now my
/boot partition no longer holds other files except for “/boot/grub/..”
What happened to my kernel files 26 and 32 that were on the /boot? (This was my fault as it seem /boot partition was not mounted properly.  I have my boot partition somewhere else, yet somehow I was looking at  /boot on my root partition.)

I’ve posted to debian mailing list:

What are my choices on installing grub-pc? Do I need “boot” partition?
What should be on it? Why did /boot kernel files got removed? Should I be
installing grub on my lvm root group? or sda? or /boot flashdrive?

> During this choice I was asked to specify mbr to install new

> boot loader. I’ve selected my “flash” drive that I have used before to
> hold my “boot” partition I believe.

I think the most normal installation is to select your first raw
drive.  That is, if you have /boot on /dev/sda1 and / on /dev/sda5 or
some such then you would install grub on /dev/sda without adding any
partition numbers.

**That is correct, I don’t know why I thought I had a usb, but in this
computer I did not have a usb driver, so I should have selected
/dev/sda.  In rescue mode I did that many times and it still failed.

> After restart I can only see “GRUB>”.

Grub appears to be installed then.  But the problem would seem to be
that grub’s configuration file didn’t point to the root filesystem.

** Correct, at that point I’m not sure if that was still grub 1 or
grub 2(grub-pc). (more on it below) The information below was very
useful after I gut the grub> menu.

If you have “grub> ” you can:

At that point you can issue instructions to grub.  You should be able
to get some good information.  It is a little confusing to describe
but the most important thing to know is that TAB will expand and list
your possible options.  Use this to explore your system at that point
and to see what is where.  You can type in “help” to get a list of
commands available but that will produce a lot of output and will
overwhelm you.

At the grub prompt type in “root (” and then hit TAB to have it
complete.  It will look like this:

grub> root (

Press TAB at that point and it will fill out to the available
options.

grub> root (hd0,

Press TAB again to have it list them out.

grub> root (hd0,
Possible partitions are:
Partition hd0,sda1
Partition hd0,sda2

Then select one of them and repeat to list the contents of that
filesystem.

grub> root (hd0,0)/
Possible files are:
lost+found/ System.map-2.6.32-5-686 vmlinuz-2.6.32-5-686 grub/
config-2.6.32-5-686 initrd.img-2.6.32-5-686

That verifies that on my system hd0,0 (/dev/sda1) is my /boot
partition.
Repeat again with the other partition numbers.

grub> root (hd0,1)/
Possible files are:
bin/ boot/ dev/ home/ lib/ lost+found/ media/ mnt/ opt/ …

That verifies that on the system I tried that hd0,1 (/dev/sda2) is the
root partition.

So to manually tell grub what it needs to boot I can type in the
following:

grub> root (hd0,0)
grub> kernel /vmlinuz-2.6.32-3-amd64 root=/dev/sda2 ro
grub> initrd /initrd.img-2.6.32-3-amd64
grub> boot

Use TAB to complete the filenames to ensure that you have the right
location and to save you from typing in all of the details of the
version numbers and architecture type.

If that works then your problem is not your grub install to the boot
partition but rather your configuration for grub in /boot/grub/* that
is the problem.

> While Recovering from grub-pc install failure. I’ve started from cd
> (rescue) mode.

A debian-installer disk in rescue mode should work okay.

> I then assembled my raid partition (sdb1,sdc1,sdd1) and

Why did you need to assemble the raid?

**I think in the “rescue CD mode it asks you to assemble raid or not”
You can select automatic assemble if you want to or you could pick a
different driver as your root. There was no issue with initrd as you
are suggesting below, but it made me pay attention to what is mounted
and what is not!!

That points to a different problem.  The raid should be automatically assembled by the initial
ram disk (initrd) and if it isn’t then you are past grub and onto the
initrd phase of boot.

Did you by any chance add a disk to the raid but not rebuild the
initrd image?  The initrd has the UUIDs of every disk in the raid as a
copy of the /etc/mdadm/mdadm.conf file in the initrd.  If you have
added a disk to the raid and it is required for the lvm to start then
this also needs to be added to the initrd copy of the mdadm.conf
file.  Otherwise it will fail to start the raid at boot time.

> executed into shell of my lvm root group mapper_xyz_root. From there I
> run “upgrade-from-grub-legecy” and this time I’ve selected my usb and
> sda to install grub.

I think you are mixing issues.  I think you mixing up grub with raid
with lvm but really those are all separate.  This is very easy to
become confused about but just the same I think that is what is
happening.

> Then I tried “update-grub”
>
> Now I get “grub loading…
> no module name found”

That I don’t know.

** It seems as the because I am using 4 x 2TB drivers and all 4 were
created using GPT partition table, and my computer/mother board was
purchased before 2010 it does not support GPT EFI, so grub needed more
space then MBR allowed, and was telling me no module found because it
didn’t have enough space to be installed.

Steps:
1. First I tried running the “grub-install /dev/sda” I would get:

grub-installer: grub-setup: warn: This GPT partition label has no BIOS
Boot Partition; embedding won’t be possible!

and
grub-installer: grub-setup: error: Embedding is not possible, but this
is required when the root device is on a RAID array or LVM volume.

I found this post:
<http://www.shuvoovuhs.com/linux/grub-installation-issue-with-2-tb-hdd-gpt-requires-bios-boot-partition/>
which said ( *have to* create a BIOS Boot Partition).

2. Reading up on it I concluded that my motherboard does not support
GPT EFI and therefore I do indeed need that partition:
http://en.wikipedia.org/wiki/BIOS_Boot_partition

3. Now since I only have one boot partition on /dev/sda1 (100mb) I had
199.9GB free. I decided to create a partition right after my 100mb. In
rescue mode cd I installed parted (in case its not installed)
aptitude install parted
then proceeded to install my new partition.
parted /dev/sda print
parted /dev/sda unit MB print
##this showed partion 1 as (31.4kb to 100MB)
parted /dev/sda
mkpart biosboot 100MB 101MB
##above created partition 2
set 2 bios_grub on
##Above enabled the bios grub partition

Then I did grub install and it successfully installed. (I rebooted and
it almost worked. I got the grub> ) but there was nothing there. I’ve
used what you email me to find my problem here.

When I did

grub-install /dev/sda

my /boot folder was in my “server1_lvmgroup-server1-root but that is
not what I had. My boot was a seperate disc /dev/sda1. So the proper
way I should have do it was:

ls /boot
#above shows only /boot/grub folder
umount /boot
#not mounted
mount -a
#this mounted my boot driver based on the /etc/fstab
ls /boot
#no I see
initrd.img-2.6.26-2-686
initrd.img-2.6.32-5-686
vmlinuz-2.6.26-2-686
vmlinuz-2.6.32-5-686

##Now I do install grub

grub-install /dev/sda
update-grub

##When you do update-grub it will find all kernels…it will say

found kernel 2.6.26…
found kernel 2.6.32….

reboot, and it worked.

I really appreciate your help.
This should really be in the Upgrades from Debian 5.0 (lenny), as if your motherboard does not support GPT EFI then
upgrade-from-grub-legacy will fail, and there is no instructions on how to go back.

I can’t really say at what point during the upgrade I had grub>? but
it all came down to creating a GPT Bios boot partition for grub-pc
(grub2).

Thank you.

***your email was most helpful. When I connected the dots with boot
partition then it all went smooth.

> What should I do now? I’ve logged in with rescue cd again and now my
> /boot partition no longer holds other files except for “/boot/grub/..”
> What happened to my kernel files 26 and 32 that were on the /boot?

Mounted the wrong partition? They should still be there.  Take a deep
breath.  Remain calm.  Try it again.  They should be there.

If you have somehow wiped them out then you will need to either
recover them or reinstall them from the chroot.

I have upgraded many machines from Lenny to Squeeze and although I
think this upgrade has the more problems of any of the previous
upgrades I have never had any of the problems you have mentioned.

> What are my choices on installing grub-pc? Do I need “boot” partition?

Yes.

> What should be on it?

Files such as:

System.map-2.6.26-2-686
System.map-2.6.32-5-686
config-2.6.26-2-686
config-2.6.32-5-686
grub/
initrd.img-2.6.26-2-686
initrd.img-2.6.32-5-686
vmlinuz-2.6.26-2-686
vmlinuz-2.6.32-5-686

> Why did files got removed?

Only you are in a position to know what you did.

> Should I be installing grub on my lvm root group? or sda? or /boot
> flashdrive?

Since you are getting the grub prompt then you have successfully
installed grub and your problem is with a later phase of the boot.

Sources:

http://www.rodsbooks.com/gdisk/booting.html

https://bbs.archlinux.org/viewtopic.php?id=114420

https://help.ubuntu.com/community/Grub2

http://lists.debian.org/debian-user/2011/08/msg00079.html

http://www.shuvoovuhs.com/linux/grub-installation-issue-with-2-tb-hdd-gpt-requires-bios-boot-partition/

http://ubuntuforums.org/showthread.php?t=1736409

http://www.debian.org/releases/stable/amd64/release-notes/ch-upgrading.en.html#newkernel

http://www.debian.org/releases/stable/amd64/release-notes/ch-upgrading.en.html#update-grub

Samba Print Server

If you need to share printers, samba print server is for you.

You will be able to

  • Install drivers for each printer on the server
  • Users will be able to double click on the new printer and it will get automatically installed and show up in their “Printers and Faxes”
  • You will be able to globally control pausing the printers is paused, or see completed jobs that are done by users
  • If for any reason printer is down, you will be able to move all print jobs from one printer to another possibly different printer (You can’t do that in Microsoft Windows)
  • Have once central place to maintain printing through the company

— Install samba and cups

aptitude install samba cups

— Setup root user with a password

smbpasswd -a root

— Get a list of current permissions. The reason we are getting a list is to find out what  “everybody” user group can do. This setup here will allow anyuser to make changes to printers configuration, and to upload drivers. If you are controlling logins via samba domain then you can probably just give  SePrintOperatorPrivilege to the user in question. Here we are just trying to get it working in most simple way possible.

— Lets add SePrintOperatorPrivilege to “everybody” so that we can upload drivers from any computer/any username. Note: This replaces “printer admin = @ntadmin” or “printer admin = nobody” in the [print$] share in prior samba <3.0 versions.

net rpc rights grant Everyone SePrintOperatorPrivilege

— Now “everyone” will have access to upload drivers. Lets update the smb.conf to enable our printer share.

vi  /etc/samba/smb.conf

— Change the security=users to security = share (uncomment it if necessary)

— The [printers] share should look like this:

[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
guest ok = no
read only = yes
create mask = 0700

— and [print$] should look like below. We are allowing write, we are allowing guest, we are forcing user root so that any drivers uploaded will have root user permissions.:

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = no
guest ok = yes
write ok = yes

write list = root, @lpadmin,nobody
force user = root

— Restart Samba

/etc/init.d/samba restart

–You are now ready to add printers. Go to http://localhost:631 and press add printer.

— When done got to your Microsoft Windows machine and you will upload the drivers to the server.

Go to \\yourcomuter

— You should see the “Printers and Faxes”, click on it and right click on the printer, go to “Properties”, then click “Advanced”, and click “New Driver”. Follow the normal process and at the end the drivers will be installed on the server.

– From any machine with same operating system as above you will go to \\computername double click on the printer, and it will automatically be installed on that computer. Enjoy maintenance free setup for years.

Enjoy

Sources:

http://lists.samba.org/archive/samba/2007-March/129995.html

Mozilla Lightning on Debian Squeeze

Hello,

To install Mozilla Lightning on Debian squeeze do the following:

aptitude install iceowl-extension

Fixes the following issues:
If you are trying to install lightning plugin version 1.0b1 January 12, 2010 2.5 MB

Works with:

  • Thunderbird 3.0b4 – 3.0.*
  • SeaMonkey 2.0b2 – 2.0.*
and you are using amd64 then you might be getting these errors if you download lightining from mozilla.org

“Could not be installed because it is not compatible with  your Icedove build type (Linux_x86_64-gcc3). Please contact the author of this item about the problem.”

Above installation fixes this issue. Enjoy!

Computer Basics (Domain, Record your desktop, commandline)

Some basic videos that everybody in technology world should know and learn:

Setup Domain Controller and know how to access your shared drives, setup user accounts, join domain, and use tools available to you.

(1)http://www.youtube.com/watch?v=QGfwfWcLFMw

(2)http://www.youtube.com/watch?v=PelA-_gT2qE

(3)http://www.youtube.com/watch?v=8hrhwzN15A4

(4)http://www.youtube.com/watch?v=2-7g_gA9NCg

(5) http://www.youtube.com/watch?v=T1AZgXqi2yQ

Know how to record your desktop so you can record and do training manuals for users.

http://www.youtube.com/watch?v=n9nAQg0B_Gk

Know your command line:

http://www.youtube.com/watch?v=TPxNAp7VRcM

Dell Latitude E6510 and Debian Squeeze

Hello,

Installing Debian Squeeze on new I7 Core Dell Latitude E65, was easy. Installation went through ok, but after installation has finished, the X would not work.

You can find details here:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=616604

Some details on fixing X was to login, and replace Xorg.conf.

-Setting-up-Linux-Debian-Squeeze-on-a-Dell-Latitude-E6510-with-Nvida-Quadro-NVS-3100M-and-1920×1080-Display

After getting the X to work, this is a great machine, fast, and with best operating system there is no limit to what you can do.

Enjoy your Dell Latitude E6510 !!!. I am!