Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 3 [4] 5 6 7

Author Topic: Linux DF delayed / Computer death thread  (Read 169005 times)

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Linux DF delayed / Computer death thread
« Reply #45 on: November 24, 2017, 05:40:05 pm »

I would strongly recommend against using WSL on Windows 10, simply because any binaries you produce will likely only run on Ubuntu 16.04 or later. A far better option would be to use VMware Player or VirtualBox to create a virtual machine from your old hard disk (either directly, or by converting it to a disk image file).

Why is that?

Well I think it's less that it will "only run on Ubuntu 16.04 or later" and more that it might cause conflicts on other distros if the distro you are using has an older version of, say, glibc (since that would be dynamically linked and not baked into the DF binary).
Not sure if Ubuntu has custom patches to their system libs also either, but generally when distributing ""universal"" Linux binaries, people tend build them on old old distros to ensure that they work everywhere else (like Debian Stable or CentOS sort of 'old').

I believe that's the idea, anyway.

We're not building DFHack and I'm not building my plugins on old old distro and no-one's complaining.

Right, I guess I forgot that gamers don't exactly run old distros (unlike people in some other fields) so that's not an issue. (If the amount of people who game on Arch, myself included in the past, is anything to go by.)

No, I meant it should work. Currently, DF itself doesn't work on old Ubuntu 12.04 anyway. It works on 14.04, as well as my stuff built on 16.04. So unless there's something related specifically to WSL, it should be fine.

hawkeye_de

  • Bay Watcher
    • View Profile
Re: Linux DF delayed / Computer death thread
« Reply #46 on: November 25, 2017, 01:21:35 pm »

For this usecase, I'd go for  VmWare/VirtualBox...

If you have the Windows 10 Pro version, another even more lightweight option would be to use a docker image for Ubuntu or whatever linux version you wanna have (Docker runs without a virtual box under Windows 10 Pro)
Logged
"No matter what you or anyone else does, there will be someone who says that there's something bad about it. Whenever somebody comes up with a good idea, there's somebody else who has never had a good idea in his life who stands up and says, "Oh, you can't do that..."

-Tom Clancy

Lightman

  • Bay Watcher
  • The groboclones are looking for you.
    • View Profile
Re: Linux DF delayed / Computer death thread
« Reply #47 on: November 25, 2017, 03:00:23 pm »

For this usecase, I'd go for  VmWare/VirtualBox...

If you have the Windows 10 Pro version, another even more lightweight option would be to use a docker image for Ubuntu or whatever linux version you wanna have (Docker runs without a virtual box under Windows 10 Pro)

I suggested Docker, too. After running some tests with it, I think it's the best option.
Logged

Mesa

  • Bay Watcher
  • Call me River.
    • View Profile
Re: Linux DF delayed / Computer death thread
« Reply #48 on: November 25, 2017, 03:56:16 pm »

At this point I feel like it's better to hold off with the suggestions and actually let Toady choose something and wait for a report, otherwise y'all are just gonna overload him with options here.  :P
Logged

Toady One

  • The Great
    • View Profile
    • http://www.bay12games.com
Re: Linux DF delayed / Computer death thread
« Reply #49 on: November 26, 2017, 03:31:56 pm »

The drive spins up in the enclosure.  I hooked it into my windows computer and it could read what appears to be an old windows partition there or something, and those files were intact.  I don't know about the Linux part, but these seem to be good signs.  Unless hooking it into the windows computer blew it up or something.

So.  Does this mean version problems are less of an issue -- can Docker or whichever other critters boot the old setup from the drive, or do we still have to rebuild the compiler etc. and compile from the virtual machine (which will still hopefully be able to recover any needed files, anyway)?
Logged
The Toad, a Natural Resource:  Preserve yours today!

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: Linux DF delayed / Computer death thread
« Reply #50 on: November 26, 2017, 04:18:15 pm »

I'd see if you can boot it after hitting F12 or whatever on a reboot?
Logged

Lightman

  • Bay Watcher
  • The groboclones are looking for you.
    • View Profile
Re: Linux DF delayed / Computer death thread
« Reply #51 on: November 26, 2017, 05:09:19 pm »

In theory, VirtualBox will let you have raw access to the disk and then you could try booting. That might be useful if you have trouble booting directly from the external USB and would probably make using the data easier.
« Last Edit: November 26, 2017, 05:12:17 pm by Lightman »
Logged

rothen

  • Escaped Lunatic
  • Nerd
    • View Profile
Re: Linux DF delayed / Computer death thread
« Reply #52 on: November 26, 2017, 06:05:11 pm »

As a networking guy, I'd definitely suggest using VirtualBox as an immediate stopgap. Unfortunately, there's no way to do what you need from the graphical interface, so you'll have to pull some command-line BS.

Once VirtualBox downloaded and installed, create a new VM. Give it a name, choose the appropriate Linux type from the menu, and set its RAM (a gig or two should be fine). Choose not to create or use a hard disk file. Once the VM is created, open a command prompt and cd to (probably) C:\Program Files\Oracle\VirtualBox. Then, run the command
Code: [Select]
VBoxManage internalcommands createrawvmdk -filename "C:\Users\<username>\VirtualBox VMs\<vm_folder_name>\<file_name>.vmdk" -rawdisk \\.\PhysicalDrive# (The physical drive number can be found by going to Disk Management in Windows.)

Once this is done, go to the VM's settings>Storage>Controller: SATA and click the "add hard disk" button. Point it to the VMDK file you just created, click OK, and boot the VM. It should fire up off of your physical disk, and you should be good to go.
Logged

NCommander

  • Bay Watcher
  • Dwarven Military Master
    • View Profile
    • SoylentNews
Re: Linux DF delayed / Computer death thread
« Reply #53 on: November 26, 2017, 06:13:44 pm »

Slightly late to the party. VirtualBox or QEMU is likely the easiest way to go here.

With raw disk, you need to be somewhat careful you don't accidentally point it at your own HDD (the one you booted from) or one that's mounted. That's a great way to get disk corruption. If you want to backup the files from the linux partition, http://www.ext2fsd.com will let you mount the partition. I recommend you mount it read only, write support was still somewhat experimental last time I checked.

Always hug your backup.
Logged
Quote from: TheFlame52
Fucking hell man, you aren't just getting the short end of the stick, you're being beaten with it.
Quote from: NRDL
Is your plan really to flush water into hell, and have the CARP marines fight them without threat of flame or disease?  If so, you are awesome, and one of the greatest DF military visionaries I've seen yet ( not that I've seen that many, or any, for that matter )

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: Linux DF delayed / Computer death thread
« Reply #54 on: November 26, 2017, 08:47:17 pm »

Restart you laptop, and keep mashing either f1, f2, f8, f12, or del, until you either get a bios or boot selection menu. Then see if the external drive shows up there.
Logged

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: Linux DF delayed / Computer death thread
« Reply #55 on: November 26, 2017, 11:22:21 pm »

Worth noting: linux plays nice and reads windows files just fine, windows does not return the favor so don't try to open linux folders/files/drives/etc on a windows machine directly, generally it won't even show them as visible thankfully but if it does you're best off pretending it didn't.
Logged

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: Linux DF delayed / Computer death thread
« Reply #56 on: November 27, 2017, 12:46:31 am »

There are tools to access EXT flavor file systems in a read only fashion from windows.  They are just fine to get data OUT of such volumes. Correct, do not try to WRITE to the volume, it is bad juju.
Logged

nutregina

  • Bay Watcher
    • View Profile
Re: Linux DF delayed / Computer death thread
« Reply #57 on: November 27, 2017, 04:30:45 am »

Just run a live-CD/USB and buld the game there.
Logged

Toady One

  • The Great
    • View Profile
    • http://www.bay12games.com
Re: Linux DF delayed / Computer death thread
« Reply #58 on: November 27, 2017, 06:15:35 pm »

Successfully backed up the Linux files with the Ext2 Volume Manager; everything looks intact!

I tried to boot from the enclosed drive using F12, and it was in the selection list, but it just took a little longer and ended up booting me back to my regular Windows drive.  This might be because there's a Windows partition on there, which failed to boot?  It didn't let me select from among the available partitions, it just had one menu item named after the enclosure manufacturer.

Next step, messing with VirtualBox.

edit: Lost as to what is meant by "\\.\PhysicalDrive#"; Disk Management in Windows doesn't seem to list anything relevant for the USB drive aside from its assigned letter.  The main drive has "TIS0008000D (C:)", but the USB has " (E:)".  I can fill in the blank space, though I haven't tried to apply that.  I can right click them to get Bus Number (1 and 0, respectively)...  and various other event IDs.
« Last Edit: November 27, 2017, 06:47:36 pm by Toady One »
Logged
The Toad, a Natural Resource:  Preserve yours today!

thewonderidiot

  • Bay Watcher
    • View Profile
Re: Linux DF delayed / Computer death thread
« Reply #59 on: November 27, 2017, 07:57:08 pm »

Great news!

I tried to boot from the enclosed drive using F12, and it was in the selection list, but it just took a little longer and ended up booting me back to my regular Windows drive.  This might be because there's a Windows partition on there, which failed to boot?  It didn't let me select from among the available partitions, it just had one menu item named after the enclosure manufacturer.

One possible cause for this, I guess, is if one had BIOS and the other has EFI. If your laptop has EFI, you might be able to find a BIOS compatibility setting in your setup -- booting from the drive might work after enabling that.

edit: Lost as to what is meant by "\\.\PhysicalDrive#"; Disk Management in Windows doesn't seem to list anything relevant for the USB drive aside from its assigned letter.  The main drive has "TIS0008000D (C:)", but the USB has " (E:)".  I can fill in the blank space, though I haven't tried to apply that.  I can right click them to get Bus Number (1 and 0, respectively)...  and various other event IDs.

It looks like you can find the PHYSICALDRIVE number by running the following command in a command prompt:
wmic diskdrive list brief
Logged
Pages: 1 2 3 [4] 5 6 7