Installing Win7 on a Dell

113 views
Skip to first unread message

Glen H

unread,
Feb 17, 2018, 9:06:03 PM2/17/18
to qubes-users
Hi,

I'm a new user and am trying to get Win7 Pro x64 installed in Qubes 4rc4. I have a Dell e7440 and it doesn't come with a Windows .iso. Before I installed Qubes I used the Dell recovery tool to create a recovery usb disk for Win7 to re-install the OS but I'm not sure if this is usable to install with Qubes.

I tried following the instructions on the Qubes website by creating a new Qube without a template but I could not change it from PVM to HVM. Then when I tried booting from the USB recovery disk it would load up a terminal and then exit after 10 seconds.

When I try to boot the recovery USB disk from the main BIOS it boots up fine. Does anyone have any tips for installing Win7 in Qubes 4?

Thanks,

Glen

Daniel Moerner

unread,
Feb 18, 2018, 9:59:24 AM2/18/18
to qubes-users

Hi,

Check out these two issues:
Installing Windows 7: https://github.com/QubesOS/qubes-issues/issues/3592
Installing Qubes Windows Tools: https://github.com/QubesOS/qubes-issues/issues/3585

The two problems you describe in the post seem to be the following:
1. Use qvm-prefs to set the virt_mode to hvm; the GUI doesn't work.
2. Make sure you set the video-model to cirrus for install.

Best,
Daniel

Glen H

unread,
Feb 19, 2018, 12:08:44 AM2/19/18
to qubes-users

Hi,

Thanks for the tips Daniel. I'm stuck at not being able to boot from the usb disk. I am doing:

```
qvm-create --class StandaloneVM --label red win7new
qvm-prefs win7new virt_mode hvm
qvm-prefs win7new memory 4000
qvm-prefs win7new maxmem 4000
qvm-prefs win7new kernel ''
qvm-volume extend win7new:root 25g
qvm-prefs win7new debug True
qvm-features win7new video-model cirrus

# Then attach usb drive to untrusted, but all of these fail to boot:

qvm-start --hddisk untrusted:sda win7new
qvm-start --hddisk untrusted:sda1 win7new
qvm-start --hddisk untrusted:/dev/sda win7new
qvm-start --hddisk untrusted:/dev/sda1 win7new
```

I'm not sure whether to use the whole drive (no name) or the first partition (named DELLRESTORE)...but I tried both.

I get the error message in the win7new terminal:

```
SeaBIOS (version ...)
Machine UUID ...
Booting from Hard Disk...
Boot failed: not a bootable disk

Booting from Floppy...
Boot failed: could not read the boot disk

No bootable device.
```

So it seems that it doesn't recognize the USB drive as bootable even though I can boot it from the main BIOS (in legacy mode).

Any help would be appreciated.

Glen

Yuraeitha

unread,
Feb 19, 2018, 1:05:09 AM2/19/18
to qubes-users
First, welcome to the Qubes community! :)

A few things first, starting to use Qubes can be a bit overwhelming, but you'll get the hang of it over time if you keep using it. For starters, look here in the command you use "untrusted:sda" which is something Qubes exclusive and you therefore had no chance knowing this. Untrusted, is a word that needs replacing for whichever untrusted AppVM you're using to hold your USB or SATA controllers. It's called untrusted because dom0 is trusted, and you need to use an less untrusted domain that doesn't compromise your more trusted domain, dom0. This is a bit tricky for new users to catch on, on, as it's ambiguity for new users, at best. To solve this, then you first need to figure out where your controller is located. If you have no sys-usb or similar, then it's likely still in dom0. It's insecure to keep this in the secure dom0 domain, but mostly you should be fine for some time yet if you're not a high target profile, and never leave your computer unattended in public or near people you don't trust with your life. Still, having it in dom0 is still more secure than not using Qubes. Just keep in mind you eventually want to migrate away from using dom0 for anything, but it's not always easy just yet due to some fixes and hardwares require you still manually manage dom0 from time to time, so it's not yet entirely a users responsibility, as there are still times when you need to use dom0.

So if your USB or SATA controllers are in dom0 (Your SATA controllers will be if you did not move them yourself, and USB controllers depend on your hardware, the installer might or might not have done it automatically). If you don't have a sys-usb VM, then it's probably still in dom0.

I don't know your current knowledge on Linux, so I'll take the liberty to add more details just in case.

In conclusion from the above, instead of untrusted, it should look like this
dom0:sda for dom0, and sys-usb:sda for sys-usb, whereever that controller is located.
further, sda may look like sdb, sdc, or if adding partitins, like sdb2 or sdf4.
It's kind of like C:/ in windows, followed by d:/ for your DVD drive, on most machines. Instead it's "sd" followed by a,b,c,d,e,f, etc.
The reason it's typically starting with "sda" when the AppVM has partitions on its own, is because they are named "xvd" followed by a,b,c,d,e,f, etc. instead of "sd" for normal physical devices. Open up the AppVM in question, and run "lsblk" to get a printout of all your "/dev/xvd's" and "/dev/sdx's".

Remember whereever that USB controller is located, you need to use that yellowish GUI widget up in the upper corner (only available in Qubes 4 onwards), to move an USB port to any other AppVM, where your iso/image recovery file is located.

Then you should be able to fix the command so that it works, knowing these 3 things.


As for the boot that doesn't work, why are you using this flag --hddisk instead of the --cdrom flag? Is this an assumption based decision or a guide you followed? This flag "might" be an additional reason that it's not booting. For image files, like your recovery medium should boot up with the --cdrom (it's an img or iso format file right? or is it a special format?).

Should look like this, just like in the link up above provided by Daniel.
qvm-start --cdrom=untrusted:/home/user/windows_install.iso win7new

Does using --cdrom flag, make any progress?

It might also be neat to know which recovery tool you used, and what format it puts your recovery backup in?


As for the conversion of an existing image file, well, I've seen various transfers from different virtual machines before, although not seen many. I do believe that I've seen an image file taken directly from a drive, and so too are the ones coming from VirtualBox. But by the word convert here, I really mean I don't know any details, just that I've seen the topic headlines briefly, and it was quite a while ago. For all I know, it could be no big deal, or really messy. I just know I've seen the topic headlines before. But I've also yet to see one where it wasn't possible to transfer/convert over though. In my anecdotal perspective on this matter, odds seems to be that it might work, though maybe with needed some work-arounds. I might look into this later today in order to learn more, I'll post if I learn anything new that might be useful.

Hopefully the first part of this post is enough to make it work though.

Glen H

unread,
Feb 19, 2018, 1:41:55 PM2/19/18
to qubes-users
Thanks Yuraeitha. This is one of the most helpful posts I have ever received. I'm not sure what the root issue was but I was able to get it to work by not burning the USB stick. Initially I used the Dell Recovery tool to burn a recovery USB stick while I still had Win 7 installed. I found out I can download the iso from any OS so I downloaded into `untrusded` AppVM from here:

https://www.dell.com/support/home/us/en/19/drivers/osiso/linux

After entering the service tag you can download the .iso. Then booted with:

`qvm-start --cdrom=untrusted:/home/user/windows_install.iso win7new`

The basics are working (including networking). I installed the windows tools following the instructions here:

https://github.com/QubesOS/qubes-issues/issues/3585#issuecomment-366471111

1) When I right click in the file manager in "untrused" AppVM to copy a file into my Windows 7 VM the copy dialog window seems to hang and nothing happens.

2) The other issue I have is I would like a menu option to start windows (instead of running `qvm-start win7new` from Dom0). I can't seem to find any info on this.

Thanks again,

Glen

Qubed One

unread,
Feb 19, 2018, 8:40:21 PM2/19/18
to qubes...@googlegroups.com, glen....@gmail.com
Glen H:
For this issue try running (in dom0):

[user@dom0 ~]$ qvm-sync-appmenus win7new


> Thanks again,
>
> Glen
>

Yuraeitha

unread,
Feb 20, 2018, 4:09:43 AM2/20/18
to qubes-users
Glad it worked out :)

Regard 1): Before moving onward with any suggestions here, did you install the Qubes-Windows-Tools inside Windows 7 after you successfully installed it? Normally templates have this by defauly out-of-the-box, but any VM's installed with no Qubes code, has no "receiving" machanism. So you need to install the Qubes code inside Windows 7, in order to receive files. Is this done yet? If not, then you can find the method on how to do so in Daniel Moerner's second link up above. Also when you see a hanging transfer but the AppVM itself is not hanging, it usually means it's pending or waiting for a response. But since Win7 can't communicate back, it'll just hang. So it seems like it's normal behaviour. If you installed Qubes-Windows-Tools however, and it still hangs on file transfers, then something is indeed wrong. But be sure it's installed first, before looking for bugs.

Regard 2):
I agree with what Qubed One suggested, that the command he listed can fix it by getting the list updated in the Qubes menu, so starting Windows by selecting a windows application. But the icon to simply just start Windows, and nothing else is removed. I'm not sure why, but it's probably just a designer opinion. It's that icon you're looking for right?

However, if you want to work-around this, then you can quickly fix this with a customized menu button, keybind, or even a script, whichever you prefer, they all do the same. If you prefer an icon to click on, then look abit further below. A script is a bit overkill for a single command, you don't need it for this particular case. All these solutions has to be done in dom0. For the keybind, Write xfce4-keyboard-settings in your dom0 terminal to open keyboard GUI settings window, or find it in the Qubes menu --> System-Tools. Then look for the "Application Shortcuts" tap in the window, and then click add a shortcut.

You can just put in "qvm-start win7new", which will then boot up your win7 when pressed.




If you want to make an icon, then the simpler choice is to use the xfce4 Launcher widget, which is included but not enabled in your menu panel. Try right click on your menu panel (top of screen by default install), click "Add new item" and then find Launcher, its usually at the top of the list.

The launcher will be invisible since no icons are in it at first, but you can typically find it on the far right of your xfce4 panel. Right click on it, and click "move", and then drag it to a location you think is suitable. For example next your Qubes menu? Then you got a launcher for your frequently (or special used) applications. To add one (or more) application shortcuts to the launcher, right click on the launcher and click "Properties". Then the "plus" icon to add an application.

It's important to notice that you can only pick application links in the launcher which have been updated by the Qubes app-sync feature (in addition to the app-sync, they must also be made visible in the menu's for the launcher to be able to detect them), and put in the default Qubes menu. Which means unselected programs in the Qubes menu, won't be pick-able in the launcher menu either. However this isn't a big problem, it's just important to know if you can't find the application you're looking for.

However, the launcher doesn't have to use Qubes menu application links, if you know the command, you can create your own. Since qvm-start Win7 is removed, you will have to do just that. Just open the launcher's properties again, pick any icon shortcut link in there, it really doesn't matter which one, just any, it wont matter. Then after its added, click on the "edit" icon while selecting the random icon. Change the name, i.e. Win7, and delete the command line, and write in "qvm-start win7new". Essentially, you change the link entirely to a new identity which you yourself described.

You can change the icon too, there are many you can pick from, but there are no windows icons in dom0, not that I know of anyway. But it can be a bit tricky to find whats in dom0 anyway, dom0 icons are spread allover the place on various places, especially considering Qubes save each icons for each AppVM, in each separate folders. If you want a windows icon however, then you need to find one by googling it, and download a suitable sized png picture or similar. But before you move the picture to dom0, it should be secured because even pictures can be exploitable. The risk might be remote in this day and age, but it's a risk nonetheless.

I haven't had the need my self, so I haven't used it before, but in the AppVM where you have your downloaded windows icon picture, use "qvm-convert-img" /path/to/picture.png /path/to/new-secured-picture.png"
I believe that's sufficient to make the command work as intended, to remove any exploits that might hide in a picture. I'm not sure if it changes picture quality, but it shouldn't matter too much for an icon if its a picture that is automatically scaled down to a small size when you apply it to an icon, and you can always scratch it if it doesn't look good anyway.

Then transfer this icon to dom0 with "qvm-run --pass-io <src-vm> 'cat /path/to/file_in_src_domain' > /path/to/file_name_in_dom0"
Source: https://www.qubes-os.org/doc/copy-from-dom0/

Be mindful that every time you move something to dom0, you take a risk. Eventually it can go bad, especially as exploits like these get more popular and frequent. It's a risk you have to take, if you're determined to get a windows icon.

Also, going beyond the respons to question 2), you may also want to look into scripting. You can do a lot of cool things with it, especially in Qubes. For example you can execute commands or even full scripts inside your AppVM's from dom0. You're not limited to just starting VM's from dom0, you can essentially do "anything" from dom0, if you know the approach to it. Scripting is relatively easy to learn too, it's not as advanced as coding, but it can be quite helpful in everyday life.

Just be careful, don't use scripts you haven't reviewed yourself and understand how work, and also review scripts again if they have, at any point, been exposed to an unsecure environment, which includes re-installing Qubes after dom0 might have been exposed.



If you want to put the icon into the Qubes menu itself, then it becomes a bit more messy, I recommend you don't go there unless you really want to, or if someone offers a straight solution to it. Personally I don't even use the Qubes panel menu plugin, I removed it entirely from the XFCE4 panel. Instead I use the Whisker-menu plugin and the Launcher plugin. I used to use Whisker menu a lot, but I've grown to enjoy launchers more in Qubes (both are pre-installed in Qubes 4, but whisker menu is not pre-installed in Qubes 3.2).

You can add as many launchers as you like, with as many icons or scripts in them as you like. You have huge flexibility here, you can change the icons and names of any icons too, change the commands, and the order they are listed and shown (although Whisker menu can do all that too, but it's not as neat as launchers are more minimalistic in size and are quicker to access).

Personally I put all my browsers in one launcher, and all my file-managers from various VM's in another launcher. I have system configurations like dom0 terminal, all the template terminals, and some of the AppVM's terminals, keybind manager, and so on, in another launcher for system tasks. A launcher for music players, libreoffice, and so on as well.Modified with icons, name changes, etc. so it looks good and stylish.

This should get you going, the sky is the limit, find a style you like :) Also by getting into these habits, you will have an easier time in the future, because it gives you more flexibility to do whatever you wish to do in many different situations, many of such situations that will come unexpectedly in the future, and many years to come.
Reply all
Reply to author
Forward
0 new messages