Question: I’ve got this [Dell XPS 15z](http://www.dell.com/us/business/p/xps-15z/pd) laptop laying around with a broken hard driving. I swapped the hard disk drive (same format) of another laptop for an SSD. So I thought I could try to make it work again by replacing the broken hard disk drive with this other hard disk drive which is still working.

Dell Laptop is working, I actually had it working with another hard disk drive on Ubuntu and Pear Linux.

But I need it on Windows 8 for a demo.

My spare hard disk drive, has already Windows 8 installed and if I were to put it back into my other laptop—a Vaio—it would boot and work properly.

But when I put that Windows 8 hard disk drive in my Dell XPS 15z I get the message 

> 
> Operating System Not Found
> 
> 
> 

I decided then I would try to reinstall Windows 8 with a USB bootable device [as explained here](http://windows.microsoft.com/en-US/windows-8/create-reset-refresh-media).

But when I boot from the USB device I get the error message again:

> 
> Operating System Not Found.
> 
> 
> 

I really don’t understand why this is not working.

PS: In the BIOS, I see the hard disk drive with it’s name and everything, so the BIOS is detecting it properly.

I tried to have a windows bootable usb, (OS running on key) when I boot in my usb flash drive, i have the same message again

Answer: 
Two ways to run a script at startup. 

* Add it to the `/etc/.rc.local` file
* Add it to `/etc/profile.d/foobar.sh`

Though keep in mind, that the script won't print because there is no terminal for standard out. 

An alternative might be to put your text in `/etc/motd` file. You will see the contents printed out every time you SSH in to the machine.
If you want your script to emit messages to the system log, use `logger` instead of `echo`.

```
#!/bin/bash
logger <<HERE
test
info
HERE
#exit  # Not really useful; the script will exit anyway

```