Freedos installation on Qemu fails with "unable to locate the installation packages" - dos

Trying to install Freedos (v1.2) in Qemu - and it fails always with the same error: Unable to locate the installation packages..
On the web there are versions of the same guide on how to do this: https://opensource.com/article/17/10/run-dos-applications-linux
I can create the image for the hard drive, then run qemu:
qemu-system-i386 -m 16 -k en-us -rtc base=localtime -soundhw sb16,adlib -device cirrus-vga -cdrom FD12FULL/FD12FULL.img -hda freedos.img -boot order=d
The installation process starts successfully, it finds the hard drive images, then it formats it and mark as primary. Then I can select the language and start the installation - on the next screen it shows a dialogue to gather information about the machine - and the next screen is the failure:
I've tried the following options when starting qemu:
for cdrom using the "standard" / "legacy" / "full" / "lite" Freedos installation CD images
using both these 4 CD images with and without the official Freedos installation Floppy
booting from CD and booting from Floppy
attaching the CD img as img or as mounted drive
If I select No - Return to DOS I always see 3 drives: (A:) having the CD image, (B:) floppy image, (C:) the empty attached drive image and a (D:) drive which is not readable.
Looked at a few findings in google (case 1, case 2) but didn't really helped much.

seems to be a bug in seabios regarding support of ATA CDROMs, see https://patchwork.kernel.org/patch/10857581/ and https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=934134

In case anyone else is looking for an answer. The problem was due to a version of seabios that has a CD driver bug. If you download the latest version and compile it. You should be able to provide the "-bios <your_newer_compiled_seabios>" to the qemu command line to get around this problem.
What I did was follow these steps:
# Get a newer version of the seabios:
$ git clone https://git.seabios.org/seabios.git
# Change directory and compile it
$ cd seabios
$ make
...
Total size: 185536 Fixed: 87584 Free: 76608 (used 70.8% of 256KiB rom)
Creating out/bios.bin
Then I used the out/bios.bin bios in your qemu command line to load it:
$ <your-qemu-command-line> -bios out/bios.bin <any other command options>
Hope that helps other folks running into the same problem.

Related

Compile AVD kernel for memory forensics with LiME

Hello this is my first time posting on stackoverflow so please forgive my naivety. I'm currently trying to compile a custom kernel with LKM enabled. The main problem is that all guides and tutorials are outdated. I can't find anything that would help or even guide in the right direction.
AVDs used for testing (Screenshot)
Cross-Compilers I've tried:
1. google toolchain64 (deprecated 13 days ago)
2. Linario
3. UberTC
4. Clang
5. android-ndk-r21 toolchains
I've been working on this for 10 days now so any help would be really appreciated.
Latest Attempt 1:
Kernel: wahoo-android-msm-wahoo-4.4
toolchain: gcc-linaro-7.5.0-2019.12-i686_aarch64-linux-gnu
Commands:
export CROSS_COMPILE=/path to tool chain/
export ARCH=arm64
make clean
make mrproper
make wahoo_defconfig
make menuconfig (to enable LKM)
make -j12
ERROR:
fails to build an image, gives no error
Latest Attempt 2:
Kernel: git clone https://android.googlesource.com/kernel/goldfish/ -b android-goldfish-4.9-dev
toolchain: gcc-linaro-7.5.0-2019.12-i686_aarch64-linux-gnu
Commands:
export CROSS_COMPILE=/path to tool chain/
export ARCH=arm64
make clean
make mrproper
make goldfish_defconfig
make menuconfig (to enable LKM)
make -j12
ERROR:
qemu: linux kernel too old to load a ram disk
EDIT:
Latest Attempt 3:
Kernel: git clone https://android.googlesource.com/kernel/common -b cuttlefish-4.4
toolchain: gcc-linaro-7.5.0-2019.12-i686_aarch64-linux-gnu
Commands:
export CROSS_COMPILE=/path to tool chain/
export ARCH=arm64
make clean
make mrproper
make cuttlefish_defconfig
make menuconfig (to enable LKM)
make -j12
ERROR:
duke#duke:~$ emulator -avd Nexus5X2 -kernel /home/duke/Downloads/cuttlefish/arch/arm64/boot/Image
emulator: WARNING: encryption is off
emulator: ERROR: AdbHostServer.cpp:102: Unable to connect to adb daemon on port: 5037
queryCoreProfileSupport: swap interval not found
failed to create drawable
failed to create drawable
failed to create drawable
failed to create drawable
failed to create drawable
failed to create drawable
failed to create drawable
failed to create drawable
qemu: linux kernel too old to load a ram disk
EDIT 2:
Latest Attempts 4 / 5:
Kernels:
git clone https://android.googlesource.com/kernel/common -b cuttlefish-4.4
git clone https://android.googlesource.com/kernel/goldfish/ -b android-goldfish-4.9-dev
toolchain: android-ndk-r21
Commands:
export CROSS_COMPILE=/android-ndk-r21/toolchains/x86_64-4.9/prebuilt/linux- x86_64/bin/x86_64-linux-android-
export ARCH=x86_64
make clean
make mrproper
make x86_64_defconfig
make menuconfig (to enable LKM)
make -j12
emulator -avd MANY -kernel x86/boot/bzImage †
emulator -avd MANY -kernel x86/boot/bzImage -verbose ††
emulator -avd MANY -kernel x86/boot/bzImage -no-snapshot-load -ranchu †††
ERROR: †
No error, AVD FAILS TO BOOT. I've waited 30 min
ERROR: ††
emulator: No acpi ini file provided, using default
ERROR: †††
No error, AVD FAILS TO BOOT. I've waited 30 min

Tensorflow in Docker on MacOs cannot load libraries with the tensorflow/tensorflow:latest image

Following the Getting Started guide for running Tensorflow in a docker container yields an error very quickly. Working through the instructions here, I pulled the tensorflow/tensorflow:latest image and then tried running:
docker run -it --rm tensorflow/tensorflow:latest python -c "import tensorflow as tf; print(tf.reduce_sum(tf.random.normal([1000, 1000])))"
It's billed as a cpu-only image (under section https://www.tensorflow.org/install/docker#examples_using_cpu-only_images), which I believe I need because I'm running on a Mac, and don't have an Nvidia graphics card. However, the following errors occur:
~/> docker run -it --rm tensorflow/tensorflow:latest python -c "import tensorflow as tf; print(tf.reduce_sum(tf.random.normal([1000, 1000])))"
2020-01-12 18:53:17.848471: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer.so.6'; dlerror: libnvinfer.so.6: cannot open shared object file: No such file or directory
2020-01-12 18:53:17.848763: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer_plugin.so.6'; dlerror: libnvinfer_plugin.so.6: cannot open shared object file: No such file or directory
2020-01-12 18:53:17.848843: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:30] Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
2020-01-12 18:53:18.288367: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory
2020-01-12 18:53:18.288461: E tensorflow/stream_executor/cuda/cuda_driver.cc:351] failed call to cuInit: UNKNOWN ERROR (303)
2020-01-12 18:53:18.288516: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (996a2dd2ab59): /proc/driver/nvidia/version does not exist
2020-01-12 18:53:18.289117: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2020-01-12 18:53:18.295734: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2592000000 Hz
2020-01-12 18:53:18.296844: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55c37f5f81f0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-01-12 18:53:18.296881: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
tf.Tensor(-203.31216, shape=(), dtype=float32)
Are the instructions misleading (saying latest is a cpu-only image) or am I missing something? I see references to cuda in the output so it would seem this isn't a cpu-only image? Should I be using a different image?
Here are my specs:
macOs Mojave - 10.14.6
Docker Desktop - 2.1.0.6
docker - 19.03.5
I had this same issue not long ago, but I discovered that it actually prints the correct result, and those logs might be warnings.
The result of print(tf.reduce_sum(tf.random.normal([1000, 1000]))) is actually tf.Tensor(-203.31216, shape=(), dtype=float32), which is in the last line of what was printed out.
if you can run your code in a jupyter notebook, then you should use the jupyter/tensorflow-notebook image.
Set it up this way:
docker pull jupyter/tensorflow-notebook
docker run -p 8888:8888 jupyter/tensorflow-notebook
After running the container, a link would be displayed on the terminal that you can use to access the notebook. Copy the link and paste in your browser, and start writing your code. It worked well for me without any of those "Warnings" printed out.
If the tensorflow container runs your code correctly with those errors still printed out, please let me know. But for now I am using the jupyter notebook container and I am not getting any errors or warnings.
If i find a way of clearing those warnings, I will let you know here.
I met this problem too, and I was trying to run on a PC. Because the nvidia-docker doesn't support Windows, I also have to use the cpu-only image.
As Odohi David said, you can run your code in a jupyter notebook. You may run it with the official image like this:
docker run -it -p 8888:8888 tensorflow/tensorflow:latest-py3-jupyter
Then open localhost:8888 in your browser. You will need a token to access the notebook and you can find it in the terminal. For example:
[I 13:57:13.801 NotebookApp] http://8c6f388f31c0:8888/?token=44ec1f209c1777c4c1b28b38b9842f297e170cbacf24b291
In this case, the token is 44ec1f209c1777c4c1b28b38b9842f297e170cbacf24b291.
After that, you can access to the official tensorflow-tutorials, and write your code on the notebook.

flutter doctor hangs after "Updating flutter tool..."

First: I have used Google to search for "flutter doctor" and searched your
site as well. I will detail my results below, but before that here is where I am:
1) I followed the directions at https://flutter.io/setup-windows/ up to the point where I am unable to proceed.
2) My environment is:
Windows 10, 64 bit, 210 Gb free space
Intel(R) Core(TM) i5-2320 CPU # 3.00GHz; 8.00 GB installed memory(RAM)
I have PowerShell 5.1,
I have setup Git for Windows with "Use Git from
the Windows Command Prompt" option
I am able to run git from the command prompt or power shell
3) I tried downloading the .zip of the beta but when I ran the
"flutter doctor" command it just hung.
4) Now for the search results:
I found 3 relevant questions:
a) "Getting Flutter doctor to work" - I tried cloning the "alpha" version
and checked the "Background Intelligent Transfer Service was running" (it
was).
b) "Running Flutter Doctor without any results" - I removed the alpha version
and cloned the beta version using git bash with the following results:
rex#NEXIUM MINGW64 /c/flutter
$ git clone -b beta https://github.com/flutter/flutter.git
Cloning into 'flutter'...
remote: Counting objects: 122267, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 122267 (delta 0), reused 0 (delta 0), pack-reused 122262
Receiving objects: 100% (122267/122267), 37.56 MiB | 2.39 MiB/s, done.
Resolving deltas: 100% (91730/91730), done.
Checking out files: 100% (2473/2473), done.
This also did not work (i.e. flutter doctor still hangs)
c) "Flutter doctor is not running in command prompt" - this one had the most
promising result:
I deleted the cache folder under the ..\AppData\Roaming\Pub directory.
when I ran "flutter doctor" this time I got the following results:
C:\Users\rex>flutter doctor
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine 09d05a38912a3c1a906e95099cac9a7e14fae85f...
Unzipping Dart SDK...
// here there was some text above the ========== in the console about bits...
// which went away, window appeared compressed and then the following message:
Updating flutter tool...
// HANGS HERE
I am hoping to get the flutter tool installed and experiment with it for developing android and/or iOS apps. I have done some development using Xamarin in the Visual Studio 2017 but there is limited support for controls and I am
hoping that this tool will be more productive. IF there is anyone who can help me get past this problem I would appreciate any help. Thanks,
Rex
NEW INFORMATION BELOW:
I tried running the flutter doctor command in a command window with adminstrator privilege with the same result. It then tried editing the flutter.bat file with some echo commands to try to get additional information which showed me that the batch file was getting to the point where the following statement is executed:
>CALL "%dart%" %FLUTTER_TOOL_ARGS% "%snapshot_path%" %*
I edited the batch file to uncomment the lines assigning the FLUTTER_TOOL_ARGS which gave me additional information and the batch file exited as follows:
================== results in the command window =====================
>C:\Windows\System32>flutter doctor
>in acquire_lock ... # ECHO to get debug information
>in subroutine ... # ECHO to get debug information
>in after_subroutine ...# ECHO to get debug information
>dart - C:\src\flutter\flutter\bin\cache\dart-sdk\bin\dart.exe # ECHO dart
>FLUTTER_TOOL_ARGS ""--checked " --observe=65432" # ECHO FLUTTER_TOOL_ARGS
#next line is ECHO of snapshot_path
>snapshot_path C:\src\flutter\flutter\bin\cache\flutter_tools.snapshot
============== the following was output from the batch file =========
Unhandled exception:
Could not load "file:///C:/Windows/System32/%20--observe=65432":
FileSystemException: Cannot open file, path =
'C:\Windows\System32\ -->observe=65432'
(OS Error: The system cannot find the file specified. , errno = >2) null
# another ECHO
after CALL ... # echo to get debug information
================== end of results in the command window =====================
=========== ANOTHER NEW EDIT =============
Just to clarify the above edit, I totally deleted everything related to flutter and then re-installed/unzipped it in another directory "C:\src\flutter" which does not require admin privilege to edit, etc. but I did not delete the cache folder under the ..\AppData\Roaming\Pub directory as before so I am going back to do that this morning. I will also use the -v or -verbose option at the command prompt to see if there is any additional help and add the new information once done.
============== FOLLOW UP EDIT ================
I remove some of the debug ECHO statements, modified others, made sure 7z.exe is in the path, removed the cache directory but the results are basically the same as follows:
C:\WINDOWS\system32>flutter doctor -verbose
Show dart, FLUTTER_TOOL_ARGS, and snapshot_path:
dart - C:\src\flutter\flutter\bin\cache\dart-sdk\bin\dart.exe
FLUTTER_TOOL_ARGS ""--checked " --observe=65432"
snapshot_path C:\src\flutter\flutter\bin\cache\flutter_tools.snapshot
execute call to dart ...
Unhandled exception:
Could not load "file:///C:/Windows/System32/%20--observe=65432":
FileSystemException: Cannot open file, path =
'C:\Windows\System32\ --observe=65432' (OS Error: The system cannot find
the file specified., errno = 2)
null
returned from call to dart
exit code 255
C:\Windows\System32>
============ Another Update ===========
I decided to try the clone of the beta again since that was the most promising of all the previous things I did. When done I used the power shell and issued the "flutter channel" command just to see what that would do. Surprisingly I got a similar result to running "flutter doctor" previously. First there was an output at the top of the screen showing dart being downloaded and then when that was done the following was printed on the console below the original command:
C:\Users\rex>flutter channel
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine
1ed25ca7b7e3e3e8047df050bba4174074c9b336...
Unzipping Dart SDK...
Updating flutter tool...
and then the console hung as before...
I finally aborted the command and set echo on in flutter.bat. That file hangs with the following command displayed on the screen (all on the same line):
C:\src\flutter>CALL "C:\src\flutter\bin\cache\dart-sdk\bin\dart.exe"
"--checked --observe=65432"
"C:\src\flutter\bin\cache\flutter_tools.snapshot" doctor
At this point I am pretty much at a loss.
Have tried the following?
Run the flutter doctor command from a command prompt with admin privileges?
Tried installing a different type of unzip program (like 7-zip) and ensuring it's in the PATH?
BTW I'm looking at this issue that seems similar to what you are describing: https://github.com/flutter/flutter/issues/11698
You can try to use the Flutter Console with Administrator Access Privilege and try to change the change the channel to the current stable version flutter channel stable
Then, once again run the flutter upgrade.
I hope this help you.
Seems like you don't have enough privilege to save or edit files in that directory.
Try to run your command prompt as admin or try to run your flutter console as admin and check if that helps.
May be Antivirus or Firewall blocking
try running windows in Safe mode and then run flutter commands
On Windows, the simplest and easiest way is, download the latest version Flutter SDK. Manually replace the current folder by pasting the downloaded flutter folder instead of the current folder in the C drive. Always choose "replace and paste".

Build R source code from windows

C:\Work\R contains the R-3.1.1.tar.gz file
I have build R source(R-3.1.1) in windows 8 from the following commands
cd C:\Work\R
tar --no-same-owner -xf R-3.1.1.tar.gz
cd C:\Work\R\R-3.1.1\src\gnuwin32\
make all recommended
Add the following path to the Environment variables
C:\Work\R\R-3.1.1\bin\i386
Enter the R.exe in command promt
I got the following Error
Fatal error unable to open the base package
System information
Windows 8, 64 bit operating System, x64 –based processor
How to resolve this error?
If you are using R, you can download the newest version from here and then simply install it.
If you have an older version and want only to download the new one, use those commands inside R:
# installing/loading the package:
if(!require(installr)) {
install.packages("installr"); require(installr)} #load / install+load installr
# using the package:
updateR() # this will start the updating process of your R installation. It will check for newer versions, and if one is available, will guide you through the decisions you'd need to make.
We can resolve this issue by using the following command before build the R source code
Set TMPDIR=c:\cygwin64\bin
Here c:\cygwin64\bin is the cygwin installed location in Windows 8 machine.
Here I have mentioned the R source code build steps:
Install cygwin setup
Install RTools
Create the R_HOME file in the directory like C:\R_HOME
Place the R source code tar file in the R_HOME
Add the following path in environment variable in first
c:\Rtools\bin\;c:\Rtools\gcc-4.6.3\bin;C:\cygwin64\bin\;C:\Program Files (x86)\HTML Help Workshop\;C:\R_HOME\R-3.1.1\bin\;
Enter the following command in the command prompt
Set TMPDIR=C:\cygwin64\bin
Set working directory as C:\R_HOME
Enter the following command
tar --no-same-owner -xf R-3.1.1.tar.gz
Copy the Tcl source from c:\R (it will be created while installing RTools)
Set the working directory as follow in command prompt
C:\R_HOME\R-3.1.1\src\gnuwin32
Enter the following command
Make all recommended
Enter the R.exe command in command prompt. We can enter the R terminal

To view dvi files under osx 10.9. X11 and Ghostscript issue

I just have upgraded to os x 10.9 (clean install), but am finding issues with ghostscipt (or with X11-quartz). I need to view a dvi file (from latex) with this line command in Terminal
$ xdvi doc.dvi
The text appears fine, but the figures (.eps, .ps) do not show up. It left blank rectangles instaed. I get this error message
Warning: Unable to load any usable fontset
gs: Unknown device: x11
gs: Unrecoverable error: undefined in .uninstallpagedevice
gs: Operand stack:
gs: defaultdevice
xdvi-xaw: Warning: Read_from_gs returned 0 bytes
P.S. I installed XQuartz 2.7.5 (xorg-server 1.14.4), and GPL Ghostscript 9.07.
Any guidance please?
The first answer is correct, as re-installing MacTex should relink gs to gs-X11.
You can also just relink it yourself. For instance:
ls -l /usr/local/bin/gs
/usr/local/bin/gs -> /usr/local/bin/gs-noX11
sudo ln -sf /usr/local/bin/gs-X11 /usr/local/bin/gs
Now xdvi displays the images. Tested on Mavericks 10.9.4.
I reinstalled latex with MacTex again and now seems working fine.
Perhaps one needs to first install ghostscript then latex (?)
But note that I did some manipulations prior to this... In fact I reinstalled Ghostscript with mac ports. But even at that time it did not work, until I reinstalled Latex as highlighted above.

Resources