boot

Linux - files and scripts that execute on boot

If I want to make something run on startup on Linux, where is the preferred place to put things? I would like a description of each script or file that is executed at boot, and that script or file's purpose as to how you edit it, or what sorts of things are normal to put in it to make run on startup....

State of Registers After Bootup

Hi, This is a low level question. For a little bit of context, I'm working on a boot loader on an x86 machine. When the BIOS copies the contents of the MBR to 0x7c00 and jumps to that address, is there a standard meaning to the contents of the registers? Do the registers have standard values? I know that the segment registers are typi...

How should I configure grub for booting linux kernel from a USB hard drive?

I have a laptop hard drive in an external enclosure which I use as a large pendrive. For an added twist, I have installed Linux on it, so I can boot any machine with my distribution of choice (e.g. for data recovery or repairing a b0rked system or just using a borrowed laptop without destroying the preinstalled Windows). The problem is t...

Booting order with SATA disks and "Dynamic Partitions"

Some time ago (the last time I had to care about this was a few years back), booting a PC worked kind of like this: There was an ORDER to disks (primary Master, primary slave, secondary master & slave) The PC would take them in order, and look for an "active partition" (which was set with FDISK) It'd boot from the first active partitio...

How do I reserve low memory (pre OS)?

Background: I need to reserve an amount of memory below 0xA0000 prior to my operating system starts. To do this I change the 0040:0013 (or 0x413) word which is the amount of low memory available in KiB. However, Windows and other operating systems use E820h/INT15h to query the memory layout and some BIOS:es doesn't reflect 0x413 changes...

How do I know if a system has powered on?

I am writing a script that powers on a system via network. And then i need to run a few commands on the other host. How do I know whether the system has powered on? My programming language is Perl and the target host is RHEL5. Is there any kernel interrupt or network boot information that indicates the system has powered on and the os...

How do I prevent two OSes from clobbering grub files?

I want to install Linux and OpenSolaris on the same hard disk in different partitions. I'm worried because OpenSolaris seems to actively manage the grub data when updating the OS (part of the "boot environment" feature). Is there anything I should prepare for to prevent my grub data from getting clobbered. If I later want to add anoth...

Best/Easy way to set up a quick booting Linux

Hopefully this still falls within StackOverflow's umbrella! I'm looking to create a quick boot linux laptop for my wife. All it really needs is to be able to do is browse the internet (with flash and video etc.). Are there any distros that are made for this, or any guides out there that show good ways to speed stuff up? I've read that ...

NTLDR Technical Info

Hi, I'm trying to figure out as much as I can about how NTLDR works. My biggest question is the following: 1) What kind of executable format does NTLDR use? I'm also curious about the following, but once I know the file format I bet these two will be easy to figure out. 2) Where in memory should NTLDR be loaded? 3) What is the entry...

How do the visually impared handle boot failures and other low-level environments

I know that screen readers and similar software exists to help the blind and visually impaired to use computers when in Windows or other operating systems. I am curious as to what support is available in lower level environments such as OS installers and BIOS setup etc. ...

How can I boot OpenSolaris x86 into single-user mode?

Modern OpenSolaris is configured to disallow root logins during normal boots. It is only possible in single-user mode. However, many instructions online simply say to add "-s" to the end of the default grub boot arguments, which leaves a graphical boot progress display in an endless loop and never enters the single-user mode console. ...

How do I build a PXE-bootable boot loader from Workbench?

I'm trying to build a VxWorks boot loader that is PXE-bootable from Workbench, but not having any success. Here is a run-down of my environment: VxWorks 6.6 + latest patches Workbench 3.0 + latest patches Montevina BSP release 2.0/1 The target is a Dell Precision M4400 laptop. Here's what I've been doing, without success: Create a ...

Execution without OS

How do you compile a C program in to a valid ELF format(or RAW format) so that it can be executed directly from RAM without any OS? Assume that a bootloader exists which is capable of loading the code to any location in RAM and start execution at that address? To be precise , what should be the compiler(GCC) flags? Is there a need for a...

Programmatic way to select boot OS?

I'm setting up a test bed where I am testing a device connection across multiple Windows OSs. I can't do it in a VM (cannot virtualize access to device) so I have quite a multi-boot system. I have a script to automate the process, but I want it go ahead and finish, selecting the next OS to boot and run its test. One problem is that XP/2...

Format a device with parted into a specific pattern using parted

Hi, This is really a parted usage question, but other ideas about how to accomplish this are welcome. I need to create a boot device set up as follows: ( up to 4MB erase block size (EBS)): partitions aligned on 4MB blocks by using 32 sectors/track and 128 heads and using odd start numbers (counting from 1) MBR: s...

Is it possible to shutdown linux kernel and resume in Real Mode?

Let's say I'd like to start a small linux distro before my ordinary operating system start. BIOS load MBR and execute MBR. MBR locates the active partition which is my linux partition. Linux start and I perform what I need to do. Linux shut down and I switch to Real Mode again. The original partition boot sector is loaded and my ordina...

Arguments to kernel

Is there anything that the kernel need to get from the boot loader.Usually the kernel is capable of bringing up a system from scratch,so why does it require anything from boot-loader? I have seen boot messages from kernel like this. "Fetching vars from bootloader... OK" So what exactly is the variables being passed? Also how's the va...

What information does BIOS load into RAM?

I know that, on booting, BIOS loads the first sector (512 bytes) of a pre-defined device drive on memory 0x7c00 and then jump to that address. So, memory from 0x7c00 to 0x7dff is occupied. Is there any other section of RAM that is occupied? If I'm programming an Operating System, could I use all the RAM except 0x7c00 to ox7dff for my o...

Where is the BCD located in windows vista/7?

I'm trying to find where the BCD (Boot Configuration Data) store is actually stored in windows vista/7. This is the information which in previous versions was stored in the boot.ini file (usually located in C:). I'm able to access the BCD through the command line tool bcdedit.exe, however I don't know where it reading the information fr...

Running git-instaweb on boot

When i run this (using the update-rc method) on boot, it shows a browser (w3m) pointing to the page and boot halts until I quit the browser. Is there a way to run it silently on boot? I looked at the manpage and it says nothing, so probably it's not supposed to work that way... Am I doing something wrong? ...