Visualizzazione post con etichetta console. Mostra tutti i post
Visualizzazione post con etichetta console. Mostra tutti i post

martedì 7 febbraio 2012

Windows XP: installare console di ripristino

Sara' vecchio, ma ancora ce ne sono parecchi in giro....sto parlando di Windows XP.

Essendo vecchio, installato su computer vecchi, capita spesso di dover eseguire qualche recupero di sistemi bloccati.

Un utile strumento e' la console di ripristino che solitamente viene lanciata eseguendo il boot dal CD di Windows XP.

E' possibile anche installarla in modo da averla sempre disponibile nel menu di Avvio.

1. Inserite il CD di Windows XP nell'unità CD/DVD. 
2. Cliccate sul pulsante Start e scegliete ESEGUI. 
3. Digitate d:\i386\winnt32.exe /cmdcons dove d corrisponde alla lettera assegnata all'unità CD-ROM. 
4. Verrà visualizzata la finestra di dialogo Installazione di Windows, in cui è descritta l'opzione Console di ripristino di emergenza. Per confermare l'installazione sceglietre SI. 
5. Riavviate il computer. Fin dal prossimo boot, nel menu di avvio sarà visualizzata la nuova opzione "Console di ripristino di emergenza di Microsoft Windows". 

mercoledì 6 gennaio 2010

Schermo nero uscendo da Virtual console

Sensazione bellissima, passeggiare per la strada e sentirsi dire: "io leggo il tuo blog, posso chiederti una cosa?" :) [*]

Il problema esposto e' il seguente: dopo essere passato sulla prima virtual console premendo CTRL-ALT-F1, non e' possibile tornare all'ambiente grafico con CTRL-ALT-F7 o con ALT-F7.

Non avendo personalmente questo problema posso dare due consigli per fare del buon vecchio troubleshooting:

1) provare a disabilitare gli effetti grafici (compiz)
2) provare a installare un kernel 2.6.32 (specialmente se si ha una scheda video Intel)

Avanti prodi lettori....se avete questo problema provate a seguire le due indicazioni, se invece l'avete risolto precedentemente, fateci sapere cosi' potremo dare la soluzione.

[*] L'alce e' notoriamente un animale schivo ma vanitoso..... 3:-)

giovedì 26 marzo 2009

Archeologia del pinguino: Serial Terminal as Console


Quella raffigurata sopra e' la copertina del numero di Aprile 1997 del Linux Journal.
L'ho tirata fuori perche' gironzolando in rete ho ritrovato un articolo che avevo pubblicato in quel numero della prestigiosa rivista.

L'articolo mostrava come modificare la gestione della console nel kernel di Linux (se non ricordo male erano i tempi della versione 2.0.x) per consentire di usare un terminale seriale come console al posto di un monitor collegato ad una scheda video.

Ecco il testo originale dell'articolo (perdonate la mia pigrizia ma non lo tradurro' in italiano...almeno non oggi):

Serial Terminal as Console by Francesco Conti

A frequently asked, but never completely answered, question in the comp.os.linux.* newsgroups and other Linux mailing lists, is the one about cheap, headless Linux boxes. It seems that many people need to install Linux boxes without a video card, a monitor or a keyboard.

A cheap response to this problem is to use a serial terminal (Wyse or Ampex, for example) as the main Linux console. This cuts the cost of a keyboard, a video card and a monitor. I've done this very thing on my second computer, an old 486 VLB, by using a Wyse 60 terminal.

Linking a terminal to your computer's serial port is not at all difficult. You can easily follow the instructions in the Serial-HOWTO and in the inittab(5) and agetty(8) man pages. Here's a short summary.

First, you must use a null modem cable.

Second, insert the following line in your /etc/inittab file, if you're using agetty. Other getty programs, like getty_ps, use a different syntax.

ID:RUNLEVELS:respawn:/sbin/agetty -L SPEED TTY TERM

where:

  • ID = a two character identifier, e.g., s1 or s2

  • RUNLEVELS = Runlevels in which the terminal must be active

  • SPEED = serial port speed

  • TTY = tty port name relative to the /dev directory

  • TERM = value to be used for the TERM environment variable

My machine's /etc/inittab has the following line:

s2:12345:respawn:/sbin/agetty -L 9600 ttyS1 vt100

for a serial terminal on the /dev/ttyS1 port (COM2 for DOS users), with a port speed of 9600 BPS and vt100 terminal emulation (which seems to run better than native Wyse 60 mode).

Finally, restart init with the command init q.

If you correctly followed these three simple steps, you should see the login prompt on your terminal screen. You can log in and work on your machine in the same way you can when you're actually on the console or telneting from a remote host.

Kernel Messages

The messages the kernel shows at boot time are always directed to your main console (tty1). If you turn on your headless box, you can only wait for the login on the terminal, which means losing those precious messages. You can see them by using the dmesg command, but usually you need them before the login shell comes up.

There are other messages on your console: those generated by the scripts in the /etc/rc.d directory, and from scripts run at boot and shutdown time. How can you really know that “the system is halted” if you can't read it on a monitor?

You must patch the /usr/src/linux/drivers/char/console.c program in your kernel source tree. It's not a complex kernel hack. You can follow these three simple steps.

First, define the CONFIG_SERIAL_ECHO symbol at program start:

#define CONFIG_SERIAL_ECHO

Second, modify the address of the terminal serial port (only if you're using a port different from that defined by default) looking for the following line:

#define SERIAL_ECHO_PORT        0x3f8   /* COM1 */
In my machine I've changed that line to:
#define SERIAL_ECHO_PORT        0x2f8   /* COM2 */
Third, rebuild your kernel and reboot: you should see on your terminal screen the kernel messages during your system's hardware devices probe.

Please note that these steps work for a 2.0.0 kernel, not on 1.2.13. I haven't yet had time to try other kernels. The console.c patch is necessary for all Linux ports except the one for Alpha, which contains it in the make config with the following option:

Echo console messages on /dev/ttyS1
Messages from /etc/rc.d/rc.*

To show these messages on your terminal, you can append > TTY to every line of these files that contains the command echo. TTY is the terminal serial port (the same one used in /etc/inittab serial terminal line).

LILO Configuration

If you want to choose among more than two kernel images, you have to modif the LILO configuration file, /etc/lilo.conf.

Complete instructions for seeing the LILO prompt on serial terminals can be found in the /usr/doc/lilo/README file (look for the SERIAL option). Here are two steps to do that correctly.

First, edit the /etc/lilo.conf file and insert a SERIAL option line after the BOOT option line:

serial=SERIAL_LINE,SPEED PARITY BITS

where:

SERIAL_LINE = 0 (com1)
1 (com2)
2 (com3)
3 (com4)
SPEED = serial port speed
PARITY = n (= none)
o (= odd)
e (= even)
BITS = bits in a character (8 or 7)
Please note that there are no spaces between the SPEED, PARITY and BITS parameters. These must be equal to the ones defined in your terminal setup. Here's the line used by my machine's LILO:
serial=1,9600n8
This line means COM2 at 9600 BPS, no parity, 8 bits per character.

Second, execute the lilo command to update your system's configuration.

Using the SERIAL option, LILO sets a two second delay (the same as when you put a delay = 20 line in the lilo.conf file) before booting the default kernel image. During this pause, you can interrupt the boot process and get the LILO prompt by sending a break to the terminal as you press the SHIFT key on your main console.

Conclusion

At last, your serial terminal can be used as a real system console. I think that the only thing you can't do is the CTRL-ALT-DEL reset—except, perhaps, with certain terminal emulations. If you're lucky, you can find one of these terminals cheaply, maybe even free, from a company upgrading its hardware.

domenica 15 luglio 2007

Command line audio player: moc

apt-get install moc


Per utilizzare MOC occorre digitare su una console il seguente comando:

mocp


Questo esegue automaticamente il server e il client (ovvero l'interfaccia) che compongono MOC.

TAB passa tra la lista di selezione file e la lista di esecuzione.

Enter esegue il file selezionato o per navigare nel filesystem.

< e > vengono utilizzati per regolare il volume.

q esce dal client lasciando in esecuzione il server

Q esce dal client ed esegue un kill del server

h visualizza l'help del programma

A aggiunge la cartella selezionata alla lista di esecuzione

a aggiunge la canzone selezionata alla lista di esecuzione


Da notare che MOC utilizza pochissime risorse e gira senza problemi anche su hardware piu' datato.

Incredibile ma vero...esistono anche i temi per MOC.

Potete trovare altre informazioni sulla MOC home page