LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slack 14.1 install - usb boot stick didn't work? (https://www.linuxquestions.org/questions/slackware-14/slack-14-1-install-usb-boot-stick-didnt-work-4175501587/)

brgr88 04-13-2014 06:33 PM

Slack 14.1 install - usb boot stick didn't work?
 
I just installed Slackware64 14.1 on another partition of my Windows7 computer, and when prompted, created a USB boot stick. However, when I try to boot off it, it's simply ignored and I go straight into Windows.

I've had USB boot sticks which others have given me work just fine on this same machine, so I know it can boot off USB.

Is there something I was supposed to've done to this USB stick beforehand? I assumed the setup utility would do whatever's needed for formatting, etc.

yancek 04-13-2014 07:22 PM

You don't indicate whether you changed the boot priority to first boot from USB. That would explain your result. If you did make this change, something obviously went wrong and you will probably have to do it over.

brgr88 04-13-2014 08:37 PM

Quote:

Originally Posted by yancek (Post 5151995)
You don't indicate whether you changed the boot priority to first boot from USB. That would explain your result. If you did make this change, something obviously went wrong and you will probably have to do it over.

Yes, I did have USB device set to be first in the boot devices list in my BIOS. My motherboard's USB boot has worked fine for another USB bootable stick I have which contains a demo Linux install; however, someone gave that to me, and I've no idea what they did to get it to work.

brgr88 04-14-2014 09:06 PM

I do have an update: It appears the bios boot order setting wasn't good enough, but if I hit a key (F8) at boot time, it would present me with a list of found devices to boot off of, and it seemed to find my boot stick.

But I selected it, and got error:
"This is not a bootable disk. Please insert a bootable floppy and try again..."

I downloaded Win32DiskImager and burnt the recent ArchLinux ISO to the same stick. Then using the above F8 method, got that to boot just fine.

So I rebooted off the Slack DVD, reran pkgtool/makebootsick, again on the same stick, and repeated the boot attempt, but got the same "floppy" error listed above.

Is there some other voodoo I need to get this to work? The stick itself evidently seems fine (as per my Arch test), but the 80.make-bootstick process isn't cutting it.

Any advice appreciated.

Didier Spaier 04-15-2014 03:54 PM

Mounting the USB stick it seems that the 14.1 version lacks a file "ldlinux.sys" that is present in the 14.0 version. I'm not 100% sure about that, because I used an internationalized script to make the boot stick instead of the genuine one in both cases, but I'll check and if this is confirmed try to understand why.

Didier Spaier 04-15-2014 05:37 PM

Well, I'm a bit puzzled, because when I run "makebootstick" on an installed Slackware64-14.1 it works, but not when I make the boot stick during installation, though /sbin/makebootstick be just a symlink to /var/log/setup/setup.80.makebootdisk that is run during installation.

I'll make more tests tomorrow, meanwhile please check that the file ldlinux.sys be present or not on your usb stick.

For that plug it in then mount it like "mount /dev/sdb /mnt" then "ls /mnt".

Of course adapt to the stick's device name if not /dev/sdb, that you can check with "cat /proc/partitions".

brgr88 04-15-2014 06:16 PM

Quote:

Originally Posted by Didier Spaier (Post 5153459)
Well, I'm a bit puzzled, because when I run "makebootstick" on an installed Slackware64-14.1 it works, but not when I make the boot stick during installation, though /sbin/makebootstick be just a symlink to /var/log/setup/setup.80.makebootdisk that is run during installation.

Didier, thank you for looking at this. I've actually just been testing it this evening and I found out the exact same thing that you did!

Prior to now, I'd only been trying to make bootsticks off the setup program from a booted installation DVD, but never after the complete install. Before today, I never installed LILO, so I've never actually booted into the full installation on my HDD itself, but have been running off the install DVD, fiddling with my stick.

Giving up on the bootstick, I finally installed LILO, booted into the full installation, reran the makebootstick script from pkgtool/setup, and it now works.

Unfortunately, I still can't boot directly off of the USB stick unless I do the F8 thing at boot time, which mostly defeats the purpose; but I guess that's between me & my motherboard--the bootstick itself is certainly working now.

Didier Spaier 04-16-2014 11:39 AM

I have narrowed the problem to this command failing in /var/log/setup/setup.80.makebootdisk if run during during installation, at least for Slackware64-14.1:
Code:

syslinux -s /dev/$STICK 1> /dev/null  2> /dev/null
To check I just replaced "2 > /dev/null" with "2>/tmp/2.txt" and here is the error message:
Code:

Error converting to codepage 850 Invalid argument
Cannot initialize 'S:'
Bad target s:/ldlinux.sys
syslinux: failed to create ldlinux.sys

It seems that this message be not uncommon but I still don't know what difference in installer's vs installed system's environments can cause it to appear only in the former case.

Maybe someone has a clue?

Else, stay tuned.

StevenXL 04-16-2014 01:31 PM

Quote:

Originally Posted by brgr88 (Post 5151978)
I just installed Slackware64 14.1 on another partition of my Windows7 computer, and when prompted, created a USB boot stick. However, when I try to boot off it, it's simply ignored and I go straight into Windows.

I've had USB boot sticks which others have given me work just fine on this same machine, so I know it can boot off USB.

Is there something I was supposed to've done to this USB stick beforehand? I assumed the setup utility would do whatever's needed for formatting, etc.

I'm a little confused here.

So you have installed Slackware already, and then you made a USB stick at the end of the installation, is that correct?

Now, even though you can boot into the slackware installation on your hard drive, you are trying to boot into slackware on your USB?

Didier Spaier 04-16-2014 01:44 PM

Quote:

Originally Posted by StevenXL (Post 5154067)
Now, even though you can boot into the slackware installation on your hard drive, you are trying to boot into slackware on your USB?

nrgr88 didn't install lilo at first on his hard disk, so he tried to use the USB stick to boot the system he had just installed.

Didier Spaier 04-16-2014 06:13 PM

I posted the issue on the syslinux mailing list and hpa answered that the message
Code:

Error converting to codepage 850 Invalid argument
comes from mtools.

I checked, that's true and linked to a change from mtools-4.0.0 that introduce the code page. I could confirm that as if I add "default_codepage=437" to /etc/mtools.conf I have now:
Code:

Error converting to codepage 437 Invalid argument
I think that this can be solved in adding the iconv binary or something to the initrd. I'll check tomorrow and report the results.

colorpurple21859 04-16-2014 08:59 PM

On my laptop I have Slackware64-current installed to a partition in msdos mode and Slackware64-14.1 installed in vmware efi mode. The laptop doesn't have efi. I have created the usb boot from the Slackware-current install, the vmware efi slackware-14.1, and by booting the bzImage and initrd.img from grub. The usb boot does not work in msdos mode and will only boot in efi mode on the vmware regardless of which system I used to create the boot stick. I have tried clearing out the partitions before running the makebootdisk. I don't know if it makes any difference but it is a 4gb sandisk. The only thing I haven't tried is from a fresh install of Slackware64. The files on the usb are f1.txt, syslinux.cfg, vmlinuz, ldlinux.sys, message.txt, and the efi boot directory, This is the ouput of fdisk -l
Code:

Disk /dev/sdb: 4004 MB, 4004511744 bytes
124 heads, 62 sectors/track, 1017 cylinders, total 7821312 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x20ac7dda

This doesn't look like a partition table
Probably you selected the wrong device.

  Device Boot      Start        End      Blocks  Id  System
/dev/sdb1  ?  3224498923  3657370039  216435558+  7  HPFS/NTFS/exFAT
/dev/sdb2  ?  3272020941  5225480974  976730017  16  Hidden FAT16
/dev/sdb3  ?          0          0          0  6f  Unknown
/dev/sdb4        50200576  974536369  462167897    0  Empty

Partition table entries are not in disk order


Didier Spaier 04-17-2014 05:08 AM

@colorpurple21859; if may memory serves me well (I wiped out vmplayer because I now use only qemu), if you configured a virtual machine in EFI mode including a line with "firmware=efi" in the the .vmx file, then the VM will only EFI boot. That means that it will show a grub menu for Slackware64-1 and refuse to boot if you don't have an EFI/BOOT directory containing relevant files.

Also, this is not the same topic, so please create a new thread for it.

colorpurple21859 04-17-2014 05:28 AM

I know efi boots differently from msdos. I was seeing if I had the same results as everyone else when creating a boot stick, except in my case creating a usb boot stick from an already installed slackware didn't work either. However, I tried in efi mode just to see if the usb stick would work on an efi system.

Didier Spaier 04-17-2014 05:36 AM

One fix checked
 
As suggested by H. Peter Anvin, using the "linux" version of syslinux (aka syslinux-nomtools) instead of the mtools version (aka syslinux) closes the issue.

To apply the fix (only for Slackware version at least 14.1 that ships a mtools version at least 4.0.0) do this:
  • ship the binary syslinux-nomtools in the /bin directory of the initrd instead of syslinux
  • in file /var/log/setup/setup.80.makebootdisk shipped in the package pkgtools, replace the line
    Code:

    syslinux -s /dev/$STICK 1> /dev/null  2> /dev/null
    with
    Code:

    syslinux-nomtools --install -s /dev/$STICK 1> /dev/null  2> /dev/null
the --install option is necessary to avoid this error message:
Code:

syslinux: no previous syslinux boot sector found
I will also see what I come up with shipping the iconv binary in the initrd instead, but that's just out of curiosity.


All times are GMT -5. The time now is 01:35 PM.