Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian User (http://www.linux-archive.org/debian-user/)
-   -   grub boot control from an usb-keyboard. (http://www.linux-archive.org/debian-user/456962-grub-boot-control-usb-keyboard.html)

Sthu Deus 11-24-2010 11:47 AM

grub boot control from an usb-keyboard.
 
Good day.

Is it possible somehow to switch the grub options (which kernel to
boot) from an USB-keyboard - it is being a laptop (w/ connected to it
keyboard and monitor so that it is always closed - never used
its keyboard/monitor) - for for now I have to edit grub's conf file and
reinstall it every time I want to switch between the booting options.

Thank You for Your time.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4ced095f.4610df0a.181b.ffffc663@mx.google.com">htt p://lists.debian.org/4ced095f.4610df0a.181b.ffffc663@mx.google.com

Klistvud 11-24-2010 12:13 PM

grub boot control from an usb-keyboard.
 
Dne, 24. 11. 2010 13:47:19 je Sthu Deus napisal(a):

Is it possible somehow to switch the grub options (which kernel to
boot) from an USB-keyboard


Grub2: http://grub.enbug.org/USBSupport
Grub Legacy: try toggling the "USB Legacy Support" option (if there is
one) in BIOS; alternatively, update to GRUB2; alternatively, connect
your USB keyboard to the PS/2 port (if there is one) using an
USB-to-PS2 adapter



--
Cheerio,

Klistvud
http://bufferoverflow.tiddlyspot.com
Certifiable Loonix User #481801 Please reply to the list, not to
me.



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1290604412.7149.1@compax">http://lists.debian.org/1290604412.7149.1@compax

Sthu Deus 11-24-2010 03:08 PM

grub boot control from an usb-keyboard.
 
Thank You for Your time and answer, Klistvud:

> Grub2: http://grub.enbug.org/USBSupport

Sorry, my fault - I did not specify grub's version - it is 2 (1.98,
exactly).

I did not understand - can You explain a bit what is the command line
(used in grub.cfg file) for the kernel to use the USB-keyboard?

- They say that I need to use the parameters at the grub's prompt - but
this is my goal to use USB-keyboard as soon as the menu appears - w/o
at the first use built-in keyboard, then - the USB-one.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4ced386d.cb7b0e0a.1a7a.ffffb2eb@mx.google.com">htt p://lists.debian.org/4ced386d.cb7b0e0a.1a7a.ffffb2eb@mx.google.com

Klistvud 11-24-2010 04:13 PM

grub boot control from an usb-keyboard.
 
Dne, 24. 11. 2010 17:08:06 je Sthu Deus napisal(a):

Thank You for Your time and answer, Klistvud:

> Grub2: http://grub.enbug.org/USBSupport

Sorry, my fault - I did not specify grub's version - it is 2 (1.98,
exactly).

I did not understand - can You explain a bit what is the command line
(used in grub.cfg file) for the kernel to use the USB-keyboard?

- They say that I need to use the parameters at the grub's prompt -
but
this is my goal to use USB-keyboard as soon as the menu appears -
w/o

at the first use built-in keyboard, then - the USB-one.


I just skimmed over the link I gave you. I thought it was dealing with
Grub configuration files, but now I see it's not ...

Essentially, what you want to do is enter the specified commands

insmod uhci; insmod usb_keyboard; terminal_input usb_keyboard

into your Grub2 configuration files, specifically into
/etc/grub.d/00_header. In that file, you'll find listed the Grub
modules that get loaded when Grub starts (around line 47 on my system).
There, (as root) add the three above commands to the existing ones,
thus:


insmod gfxterm
insmod vbe
insmod uhci
insmod usb_keyboard
insmod terminal_input usb_keyboard

Save the file, run update-grub (as root again), and reboot.

Disclaimer: while the above commands should work, there's a good chance
they won't, and I've not tested them personally. Grub2 is still under
heavy development, and the documentation is more or less "in fieri".
There are some reports that USB support in Grub2 is not complete (see
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/432276). In
addition, the Grub2 version shipped with Lenny is a bit long in the
tooth. You'd possibly have more luck if you were using Squeeze.


--
Good luck,

Klistvud
http://bufferoverflow.tiddlyspot.com
Certifiable Loonix User #481801 Please reply to the list, not to
me.



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1290618783.7149.3@compax">http://lists.debian.org/1290618783.7149.3@compax

Klistvud 11-24-2010 04:31 PM

grub boot control from an usb-keyboard.
 
Dne, 24. 11. 2010 18:13:03 je Klistvud napisal(a):

insmod terminal_input usb_keyboard


Sorry. Strike "insmod". That was just a copy+paste typo ...

--
Cheerio,

Klistvud
http://bufferoverflow.tiddlyspot.com
Certifiable Loonix User #481801 Please reply to the list, not to
me.



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1290619908.7149.4@compax">http://lists.debian.org/1290619908.7149.4@compax

Sthu Deus 11-24-2010 05:34 PM

grub boot control from an usb-keyboard.
 
Thank You again, for Your time and answer, Klistvud:

> into your Grub2 configuration files, specifically into
> /etc/grub.d/00_header. In that file, you'll find listed the Grub
> modules that get loaded when Grub starts (around line 47 on my
> system). There, (as root) add the three above commands to the
> existing ones, thus:
>
> insmod gfxterm
> insmod vbe
> insmod uhci
> insmod usb_keyboard
> insmod terminal_input usb_keyboard

This is what I have now at the place in the file:

set gfxmode=640x480
insmod gfxterm
insmod vbe
insmod uhci
insmod usb_keyboard
terminal_input usb_keyboard
terminal gfxterm

Is it correct? - For now it works not - but I set 1 sec to wait - so I
will try latter w/ larger period.

> Save the file, run update-grub (as root again), and reboot.

I have two similar files here:

update-grub and
update-grub2

should I use the first one only? - Can You shed some light here?

How I do update my grub2 configuration is

/usr/sbin/grub-install /dev/sda


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4ced5acd.cb7b0e0a.12ff.ffffbe32@mx.google.com">htt p://lists.debian.org/4ced5acd.cb7b0e0a.12ff.ffffbe32@mx.google.com

Klistvud 11-24-2010 09:03 PM

grub boot control from an usb-keyboard.
 
Dne, 24. 11. 2010 19:34:38 je Sthu Deus napisal(a):
This is what I have now at the place in the file:

set gfxmode=640x480
insmod gfxterm
insmod vbe
insmod uhci
insmod usb_keyboard
terminal_input usb_keyboard
terminal gfxterm

Is it correct? - For now it works not - but I set 1 sec to wait - so I
will try latter w/ larger period.

As far as I can tell, it should be OK. If I were you, I would set that
to at least 10 seconds until it works, then, once I got it working, I'd
set it back to 1 sec.



Save the file, run update-grub (as root again), and reboot.

I have two similar files here:

update-grub and
update-grub2

should I use the first one only? - Can You shed some light here?

I *think* the second one should be just a softlink to the second one,
or vice versa. I'd try running the first one and then check whether
/boot/grub/grub.cfg has changed. If I remember right, it should now
have the new insmod commands somewhere (it's what update-grub does,
essentially -- it parses the various scripts in /etc/grub.d and builds
the new /boot/grub/grub.cfg from them).



How I do update my grub2 configuration is

/usr/sbin/grub-install /dev/sda

You shouldn't have to do that anymore. That was only needed the first
time you installed Grub2 onto your MBR; given that you obviously have
Grub installed now, you only need to run 'update-grub'. That will
re-configure Grub in a relatively safe way, that is, without
re-installing it. So, I wouldn't reccommend running grub-install, no.


Again, what we're doing here is pretty much guesswork, so there's no
guarantee we will be able to make it work. But there's no harm in
trying, right?


P.S. Sorry for the messed-up formatting, my mail client is having a fit.
--
Cheerio,

Klistvud
http://bufferoverflow.tiddlyspot.com
Certifiable Loonix User #481801 Please reply to the list, not to
me.



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1290636207.27308.0@compax">http://lists.debian.org/1290636207.27308.0@compax

Andrei Popescu 11-24-2010 10:47 PM

grub boot control from an usb-keyboard.
 
On Jo, 25 nov 10, 01:34:38, Sthu Deus wrote:
>
> I have two similar files here:
>
> update-grub and
> update-grub2
>
> should I use the first one only? - Can You shed some light here?

If you just cat update-grub2 it will be obvious ;)

Regards,
Andrei
--
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic

Sthu Deus 11-25-2010 04:56 AM

grub boot control from an usb-keyboard.
 
Thank You for Your time and answer, Andrei:

> If you just cat update-grub2 it will be obvious ;)

Not to me :)
- As it comes from grub2 package.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4cedfab1.d07b0e0a.2b1a.0acf@mx.google.com">http://lists.debian.org/4cedfab1.d07b0e0a.2b1a.0acf@mx.google.com

Sthu Deus 11-25-2010 05:48 AM

grub boot control from an usb-keyboard.
 
Thank You for Your time and answer, Klistvud:

> As far as I can tell, it should be OK. If I were you, I would set
> that to at least 10 seconds until it works, then, once I got it
> working, I'd set it back to 1 sec.

> Save the file, run update-grub (as root again), and reboot.

So I have done. But it still no luck.

> I *think* the second one should be just a softlink to the second

I thought the same - but it is not - that's why I asked here.

> Again, what we're doing here is pretty much guesswork, so there's no
> guarantee we will be able to make it work. But there's no harm in
> trying, right?

Absolutely!

> P.S. Sorry for the messed-up formatting, my mail client is having a
> fit.

Please, do not worry. Thank You for Your time.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4cee06df.52790e0a.6057.0c69@mx.google.com">http://lists.debian.org/4cee06df.52790e0a.6057.0c69@mx.google.com


All times are GMT. The time now is 05:48 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.