Pular para o conteúdo principal

Configure Linux to boot without a monitor

Configure Linux to boot without a monitor: "
Many administrators/users prefer to set up their servers as headless machines. If you’re not sure what a headless machine is – it’s a PC without a monitor. This is an outstanding way to use Linux as a server as typically people install Linux servers sans GUIs. Thing is, a problem has arisen with recent iterations of Linux distributions. In recent releases (especially with Ubuntu) the distributions do not use an X configuration. This is great for end-users on desktops because the operating auto-detects the graphics chip and monitor for auto-X configuration. This is a problem for a headless server as there will be monitor attached. When Ubuntu >= 10.04 gets to the monitor detection it will freeze and your headless server is worthless.
You could work around this by plugging in a monitor, mouse, and keyboard and letting the OS boot and then removing the monitor when the boot process has finished. This is a far from ideal solution. Fortunately the Linux community has come up with a temporary work around for this issue (I’m confident the distribution developers will come up with a much better solution soon). Let’s take a look at the solution.
Warnings
This solution requires that you create an /etc/X11/xorg.conf configuration file. I assume that anyone wanting to set up a headless server isn’t afraid of manually creating/editing the xorg.conf file. If you are, make sure you back up any pre-existing xorg.conf file that might live in /etc/X11.
This guide also assumes that you already have a working server installation that you can successfully boot with an attached monitor. I will also assume you know what graphics card is in your server. You will need this information momentarily (so if you don’t know it, dig around and find out what card you are using). With that being said, let’s get on with it.
xorg.conf
The first thing you need to do is to set up the xorg.conf configuration. If one already exists, copy it to /etc/X11/xorg.conf.OLD and then erase the contents of the /etc/X11/xorg.conf file. The new contents of that file will be:
Section 'Device'
Identifier 'VNC Device'
Driver 'vesa'
EndSection

Section 'Screen'
Identifier 'VNC Screen'
Device 'VNC Device'
Monitor 'VNC Monitor'
SubSection 'Display'
Modes '1024x768'
EndSubSection
EndSection

Section 'Monitor'
Identifier 'VNC Monitor'
HorizSync 30-70
VertRefresh 50-75
EndSection

Once you have saved and closed that file you now need to edit the /etc/default/grub file and add the following line:
GRUB_CMDLINE_LINUX='nomodeset'
You can take this one step further and disable the splash screen for the boot process by setting the line:
GRUB_CMDLINE_LINUX_DEFAULT=
to “quiet” instead of “quiet splash
Save the /etc/default/grub file and then issue the command sudo update-grub to rebuilt grub.
To test this setup go ahead and boot the machine without the monitor attached. Once you have given it plenty of time to boot you can either VNC or ssh into the machine. If you get a successful connection you are good to go. If you do not get a successful connection plug the monitor back in and see where in the process it stopped. If you have a black screen revisit the configuration and make sure everything is correct. To further troubleshoot boot the machine with the monitor plugged in and check the /var/log/Xorg.0.log file for any errors. Hopefully you will find the setup above works like a champ.

© Jack Wallen for gHacks Technology News, 2010. | Permalink | Add to del.icio.us, digg, facebook, reddit, twitter
Post tags: , , , , ,

"

Comentários

Postagens mais visitadas deste blog

Favigen, Favicon Generator

Favigen, Favicon Generator : " Favicons are small icons that help identify websites. They are used as a visual representation of a website both in the web browser and at many online services. The three most prominent locations of favicons are the browser’s address bar, the tabbar and the bookmarks folder. Many webmasters like to create custom favicons to add that custom identifier to their website. Favicons can be created in many image and icon editors, but also online. Favigen is a straightforward favicon generator that can turn an image into a favicon. All that it takes is to pick an image from the local hard drive first, select the dimensions of the favicon and click the submit button to make the service generate the favicon. Favigen supports several image formats, including jpg and png, and it does not seem to have size restrictions either. Available image dimensions range are 16×16, 32×32 and 64×64. The generated favicon is displayed directly on the page. A click on do...

A simple rsync script to back up your home directory

A simple rsync script to back up your home directory : " Backing up important data is obviously something we should all do. Unfortunately, it is not always easy to make it happen. We get lazy; we do not have the additional hardware for a backup server; it takes a long time and a lot of CDs to back up to optical media; we do not trust online backup services; backup schemes are difficult to set up and use — any of dozens of reasons can stand in our way. Still, we know we should be backing up our important data. Modern open source Unix-like operating systems offer a plethora of options for incredibly simple, effective backup schemes, however. If the problem is figuring out how to set one up, a simple rsync solution may be exactly what you need. The rsync utility is used to synchronize files between two systems. It does so by way of incremental copies, only copying from the source to the destination what has not already been copied there, saving time, network bandwidth, and syst...

The 10 hottest checklists, forms, and templates of 2010

The 10 hottest checklists, forms, and templates of 2010 : " The 10 hottest checklists, forms, and templates of 2010 Takeaway: TechRepublic published nearly 400 original downloads in 2010 — from cost calculators to cheat sheets to logs, templates, and PowerShell scripts. Here’s a rundown of some of the most popular items of the year. This year, we added hundreds of resources to the TechRepublic downloads library , including PDFs detailing the latest technologies, problem-solving techniques, and tips for handling tasks efficiently. We also updated a few favorite custom tools and introduced some new ones. Among the biggest crowd-pleasers were several checklists designed help you systematically address tasks ranging from server deployments to virus removal to project risk management. Here’s what you liked best in 2010. 1: Workstation Tune-up Checklist Optimizing a slow-performing system requires a number of diagnostic and repair steps, often with...