[openbox] Switching to console does not work.

Mathias Dufresne mathias.dufresne at gmail.com
Thu Jun 5 08:15:34 EDT 2014


For lazy people (yes I know some are trying to hide themselves at the back
near the window ;)
http://www.linuxquestions.org/questions/linux-general-1/ctrl-alt-f1-%3D-black-blank-screen-385376/#post4593178

If I read carefully enough this should come from grub configuration.

The main issue is Ubuntu is designed to be user friendly and would stupidly
erase grub configuration at each kernel update. This Linux distribution has
to be avoid in my own opinion... But, you have it, you won't change today :
)

So the point will be to change your system configuration to avoid grub
setup to erase your modification.

For me, the simplest way to proceed is to:
1) create a working grub.cfg (the one you are using right now)
2) change it for it give you access to your console
3) change it for it uses a link to your current kernel and initrd rather
than using the kernel / initrd file name.
4) modify grub2 setup scripts for they are not working any more (removing
the executable bit one them for they can't be run when apt* would upgrade
your grub or your kernel
5) run grub-install or grub2-install specifying your harddrive name:
grub2-install /dev/sda

1) your system boots -> you have the grub.cfg working
2) according to the link in the beginning of this mail, change one of your
grub entries (the one you use each is a good candidate, you could copy it,
changing its name, to keep your working config and create a new one for
testing) by modifying the "linux" line, then the initrd line:
3) this needs two actions:
a - cd /boot
ln -s kernel-version-you-want-to-use vmlinuz
ls -l /boot/vmlinuz
/boot/vmlinuz -> kernel-version-you-want-to-use
ln -s initrd.img-X.Y.Z-blablabla initrd.img


On my own system that gives me that:
ls -l /boot/vmlinuz
lrwxrwxrwx 1 root root 44 23 févr. 13:44 /boot/vmlinuz ->
kernel-genkernel-x86_64-3.12.2-gentoo-virtio

b - back into /boot/grub/grub.cfg, still modifying the "linux" line,
replace /boot/kernel-version by /boot/vmlinuz

One some of my Debian there, initially a grub entry is:
*menuentry* 'Debian GNU/Linux, with Linux 3.2.0-4-amd64' --class debian
--class gnu-linux --class gnu --class os {
        load_video
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos1)'
        search --no-floppy --fs-uuid --set=root
52a22bfb-be26-48eb-8345-7d813b8424b8
        echo    'Loading Linux 3.2.0-4-amd64 ...'
        *linux*   */vmlinuz-3.2.0-4-amd64* root=/dev/mapper/rootvg-rootlv
ro  quiet
        echo    'Loading initial ramdisk ...'
        *initrd  /initrd.img-3.2.0-4-amd64*
}

Would become:
*menuentry* 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu
--class os {
        load_video
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos1)'
        search --no-floppy --fs-uuid --set=root
52a22bfb-be26-48eb-8345-7d813b8424b8
        echo    'Loading Linux 3.2.0-4-amd64 ...'
        *linux*   */vmlinuz* root=/dev/mapper/rootvg-rootlv ro  quiet
        echo    'Loading initial ramdisk ...'
        *initrd*  */initrd.img*
}

Notes:
- /vmlinuz is used rather than /boot/vmlinuz because I use separated /boot
partition.
- I changed the menuentry name to remove kernel version, this entry as no
more reason to be changed again.

4) removing auto updte of grub.cfg:
When grub-setup is launched it runs scripts in /etc/grub.d to create your
new grub.cfg. It do that because the scripts inside that directory are
executable. To avoid grub erasing your config, just do that:
chmod -x /etc/grub.d/*

So now you have:
created the two links in /boot
modified your /boot/grub/grub.cfg
removed the executable bit on all files in /etc/grub.d

you can launch "grub-install /dev/sda" if /dev/sda is really your disk : )



2014-06-05 13:38 GMT+02:00 Mathias Dufresne <mathias.dufresne at gmail.com>:

> Hi,
>
> You should look into Xorg's configuration rather than into Openbox's one.
> Openbox is, for me, responsible of window management into X but not to
> switch outside of X.
>
> As for Ctrl + Alt + Backspace, which is configured into keyboard section
> of Xorg files.
>
> Perhaps you should have a look there:
> http://ubuntuforums.org/showthread.php?t=1471825
>
> The title of this thread is: "no ctrl alt f1 ubuntu 10.04" and is tagged
> as resolved.
>
> Cheers,
>
> mathias
>
>
>
> 2014-06-05 8:12 GMT+02:00 Mindaugas B <minde.b at gmail.com>:
>
>> It looks at the end that it is related to startx not with openbox related.
>>
>>
>> video card :
>> 00:02.0 VGA compatible controller: Intel Corporation Device 0be2 (rev 0b)
>>
>> consoles running:
>>
>>
>>
>>
>>
>> * 805 tty4     Ss+    0:00 /sbin/getty -8 38400 tty4  809 tty5     Ss+
>> 0:00 /sbin/getty -8 38400 tty5   814 tty2     Ss+    0:00 /sbin/getty -8
>> 38400 tty2  816 tty3     Ss+    0:00 /sbin/getty -8 38400 tty3  818
>> tty6     Ss+    0:00 /sbin/getty -8 38400 tty6 1019 tty1     Ss+    0:00
>> /sbin/getty -8 38400 tty1*
>>
>> no /etc/inittab file
>> but i have  default runlevel /etc/init/rc-sysinit.conf:
>> ..
>> *env DEFAULT_RUNLEVEL=2*
>> ..
>>
>> also i use config in these files, this launch startx on tty8:
>> /etc/init/tty8.conf
>>
>> contents of file tty8.conf:
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *# tty8 - getty## This service maintains a getty on tty8 from the point
>> the system is# started until it is shut down again.start on stopped rc
>> RUNLEVEL=[2345] stop on runlevel [!2345]respawnexec /bin/openvt -fwc8 --
>> /usr/bin/sudo -H -u user /usr/bin/startx*
>>
>>
>> in user profile folder there is .Xsession witch launch openbox
>>
>>
>>
>>
>>
>>
>>
>> *#!/bin/sh# OPEN BOX STARTUP ## start idesk, icons on
>> desktop/usr/bin/idesk &openbox*
>>
>>
>>
>>
>> _______________________________________________
>> openbox mailing list
>> openbox at icculus.org
>> http://icculus.org/mailman/listinfo/openbox
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/openbox/attachments/20140605/5cc03f79/attachment-0001.html>


More information about the openbox mailing list