LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 07-29-2013, 12:31 AM   #1
dchmelik
Member
 
Registered: Nov 2008
Location: Washington state, USA
Distribution: BSD, GNU/Linux (Slackware, etc.,) openSolaris
Posts: 195

Rep: Reputation: 21
critical Slackware USB flash drive boot installer issue


Why does the Slackware USB flash drive boot installer creation process involve making a damn Windows partition to put the installer on?!

I made a new USB flash drive installer, and when the BIOS of the system I tried it on did not detect it but started starting Windows, I took the flash drive out, but Windows must have tried to access the flash drive's Windows partition--then it was ruined!

Slackware is the greatest system for development purposes (even has more than any default BSD install, AFAIK, though perhaps BSD is still more stable) and that is great, but one would not expect such a system to use a Windows partition on its installer, and I have a serious problem with that!
 
Old 07-29-2013, 03:46 AM   #2
elesmod
Member
 
Registered: Sep 2012
Distribution: Slackware
Posts: 84

Rep: Reputation: Disabled
The Slackware USB flash drive creator makes a Windows partition because BIOSes can't boot from file systems such as e.g. ext4.

If your BIOS didn't boot from the flash drive, then either:
1) you've set the booting process wrong in the BIOS;
2) the flash drive didn't prepare correctly and is not bootable;
3) the BIOS doesn't have an option to boot from USB flash drives (usually in older computers).

Quote:
Originally Posted by dchmelik View Post
Windows must have tried to access the flash drive's Windows partition--then it was ruined!
What do you mean it's ruined? The USB stick is ruined? How?

You could tell us how you prepared your Slackware install flash drive.
 
Old 07-29-2013, 04:14 AM   #3
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,014

Rep: Reputation: 146Reputation: 146
It's trivial to use another filesystem type that syslinux supports for the usb drive installer. I use ext2, for instance. This is no critical issue.

Are you sure you have your usb drive first in the boot device list, have syslinux installed on it, and the boot partition active?
 
Old 07-29-2013, 04:15 AM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,530
Blog Entries: 2

Rep: Reputation: 4024Reputation: 4024Reputation: 4024Reputation: 4024Reputation: 4024Reputation: 4024Reputation: 4024Reputation: 4024Reputation: 4024Reputation: 4024Reputation: 4024
Quote:
Originally Posted by elesmod View Post
The Slackware USB flash drive creator makes a Windows partition because BIOSes can't boot from file systems such as e.g. ext4.
BIOSes can't boot from any filesystem (UEFI firmware can read FAT partitions, BIOSes don't), they rely on finding executable code in the MBR of the medium you want to boot from.

To the original question, I never had to create a Windows filesystem when using the USB installer, all I ever do is writing the usbboot.img to the USB device using cat or dd. I also can't see any instructions to create a Windows partition in the USB README file?
Please elaborate where you did get those instructions and what exactly have you done, including why you think that the Windows installation has ruined your USB device.
 
Old 07-29-2013, 04:21 AM   #5
dchmelik
Member
 
Registered: Nov 2008
Location: Washington state, USA
Distribution: BSD, GNU/Linux (Slackware, etc.,) openSolaris
Posts: 195

Original Poster
Rep: Reputation: 21
Quote:
Originally Posted by TobiSGD View Post
Please elaborate where you did get those instructions and what exactly have you done, including why you think that the Windows installation has ruined your USB device.
I recall when doing an fdisk on a USB flash drive set up by the instructions on Slackwiki's 'Install Slackware Using A USB Flash Drive', that its partition was listed as a hidden Windows type (those instructions use dd, so erase everything from the drive by overwriting it all with its own partition table and data). Ok, so the instructions are probably unofficial, but I am wondering not only what was the writer thinking, but why the software they used that is a part of Slackware made this ISO file that when dd was used made a Windows partition on the USB flash drive. I did not install Windows--I was trying to install Slackware on a system that currently has Windows on it, but since the Slackware installer process for a USB flash drive makes a Windows partition on the flash drive, Windows started reading it, without me remembering or noticing that, then I took it out, and can no longer detect the drive when it is plugged into any computer. Windows of course does not read from any type of ext partition, and it would have been ok to remove the drive if it had used an ext partition... but apparently it does not--otherwise it would not be ruined now (i.e., Windows 'mounted' it in the first few seconds of its boot process, and probably did something more that it should not have been doing, i.e. not just reading from it).

To answer another question asked above: the system I was trying this on does not even boot from USB--I selected something I thought might have been the USB flash drive after I plugged it in before turning on the computer on (since some BIOSes detect stuff plugged in, or have options that were updated but not documented) but it was the hard drive. This was not a question about the simple process of installing anything, which I have decades of experience with.

The flash drive was prepared correctly, because I have done this before, and the commands finished fine.

Coreboot is an example of a BIOS that can be compiled to boot from ext, if Coreboot even does not normally have an option or module to do that by default, but AFAIK it is as TobiSGD says--BIOS looks at a MBR to boot: if you have ever done fdisk on a new USB flash drive, or partitioned one like a new one, they have a little space at the beginning before the filesystem starts. I do not recall how it was with floppy discs; they might have worked similarly, though I do not recall if I ever did fdisk on one.

Last edited by dchmelik; 07-29-2013 at 04:43 AM. Reason: to be clearer
 
Old 07-29-2013, 04:43 AM   #6
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 6,959
Blog Entries: 52

Rep: Reputation: Disabled
Try using the usbimg2disk script:
http://slackware.mirrors.tds.net/pub...xe-installers/
 
Old 07-29-2013, 04:48 AM   #7
dchmelik
Member
 
Registered: Nov 2008
Location: Washington state, USA
Distribution: BSD, GNU/Linux (Slackware, etc.,) openSolaris
Posts: 195

Original Poster
Rep: Reputation: 21
Quote:
Originally Posted by brianL View Post
I looked in that script, and it makes a 32-bit FAT partition, just like the instructions I used. I think one can make whatever partition type one wants on a USB flash drive--I recall doing so recently (and then using the drive)--so apparently my criticism may be correct!

Last edited by dchmelik; 07-29-2013 at 04:49 AM.
 
Old 07-29-2013, 05:53 AM   #8
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,530
Blog Entries: 2

Rep: Reputation: 4024Reputation: 4024Reputation: 4024Reputation: 4024Reputation: 4024Reputation: 4024Reputation: 4024Reputation: 4024Reputation: 4024Reputation: 4024Reputation: 4024
I think that the labels from fdisk regarding the filesystems used are simply wrong. While fdisk reports this on my USB device with the installer copied to it
Code:
Disk /dev/sdd: 16.0 GB, 16039018496 bytes
64 heads, 32 sectors/track, 15296 cylinders, total 31326208 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/sdd1   ?  3224498923  3657370039   216435558+   7  HPFS/NTFS/exFAT
/dev/sdd2   ?  3272020941  5225480974   976730017   16  Hidden FAT16
/dev/sdd3   ?           0           0           0   6f  Unknown
/dev/sdd4        50200576   974536369   462167897    0  Empty

Partition table entries are not in disk order
I get this from parted
Code:
Model: Corsair VoyagerGT (scsi)
Disk /dev/sdd: 16.0GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags: 

Number  Start  End     Size    File system  Flags
 1      0.00B  16.0GB  16.0GB  fat16
(which is by the way impossible, since FAT16 does not support partitions of that size) and lsblk does not report any partition on that device, which relates to the dmesg output, that also does not see any partition
Code:
[431975.070298] usb 6-4: new high-speed USB device number 4 using ehci-pci
[431975.188162] usb 6-4: New USB device found, idVendor=1b1c, idProduct=1a90
[431975.188174] usb 6-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[431975.188181] usb 6-4: Product: VoyagerGT
[431975.188187] usb 6-4: Manufacturer: Corsair
[431975.188192] usb 6-4: SerialNumber: AA04012700009218
[431975.189514] usb-storage 6-4:1.0: USB Mass Storage device detected
[431975.189677] scsi14 : usb-storage 6-4:1.0
[431976.987523] scsi 14:0:0:0: Direct-Access     Corsair  VoyagerGT        1100 PQ: 0 ANSI: 0 CCS
[431976.990410] sd 14:0:0:0: [sdd] 31326208 512-byte logical blocks: (16.0 GB/14.9 GiB)
[431976.991421] sd 14:0:0:0: [sdd] Write Protect is off
[431976.991433] sd 14:0:0:0: [sdd] Mode Sense: 43 00 00 00
[431976.993299] sd 14:0:0:0: [sdd] No Caching mode page present
[431976.993309] sd 14:0:0:0: [sdd] Assuming drive cache: write through
[431976.998778] sd 14:0:0:0: [sdd] No Caching mode page present
[431976.998788] sd 14:0:0:0: [sdd] Assuming drive cache: write through
[431977.001168]  sdd:
[431977.003527] sd 14:0:0:0: [sdd] No Caching mode page present
[431977.003536] sd 14:0:0:0: [sdd] Assuming drive cache: write through
[431977.004284] sd 14:0:0:0: [sdd] Attached SCSI removable disk
But in any way, even if Windows altered something on that partition that should not alter in any way the partition table, so that the device can not be seen anymore may be a coincidence. What is the output of dmesg regarding this device?
 
Old 07-29-2013, 06:09 AM   #9
dchmelik
Member
 
Registered: Nov 2008
Location: Washington state, USA
Distribution: BSD, GNU/Linux (Slackware, etc.,) openSolaris
Posts: 195

Original Poster
Rep: Reputation: 21
Quote:
Originally Posted by TobiSGD View Post
I think that the labels from fdisk regarding the filesystems used are simply wrong.
Ok; and how did you make that installer? It looks like you did it differently than me, but the fact is, the script mentioned above makes a FAT partition. The fdisk output did not necessarily look wrong, but the parted output did. I would not trust fdisk for anything above 2 TB, though one needs something like parted for that, and if it is giving wrong data, that is unfortunate.

Quote:
But in any way, even if Windows altered something on that partition that should not alter in any way the partition table, so that the device can not be seen anymore may be a coincidence. What is the output of dmesg regarding this device?
After I unplugged the USB flash drive from the Windows machine and into my Slackware one, there was some bizarre dmesg I am not sure I had ever seen before. I must have rebooted to try a pxe installation, and now there is simply no dmesg output about the USB flash drive, and no lights flashing on it. If one takes out such a drive when it is being written to--which apparently Windows must have done for some idiotic reason--that is what one is often left with (or soon after, after being only partly readable): a drive damaged to the extent it is not even detected.

Last edited by dchmelik; 07-29-2013 at 06:12 AM.
 
Old 07-29-2013, 06:27 AM   #10
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,530
Blog Entries: 2

Rep: Reputation: 4024Reputation: 4024Reputation: 4024Reputation: 4024Reputation: 4024Reputation: 4024Reputation: 4024Reputation: 4024Reputation: 4024Reputation: 4024Reputation: 4024
Quote:
Originally Posted by dchmelik View Post
Ok; and how did you make that installer?
I did it as the README stated, using dd to write the image to the USB device.

Quote:
If one takes out such a drive when it is being written to--which apparently Windows must have done for some idiotic reason--that is what one is often left with (or soon after, after being only partly readable): a drive damaged to the extent it is not even detected.
I extensively work with USB devices on Windows machines and this never happened to me. Therefore I mentioned that this may be just coincidence and the device was dying anyways.
 
Old 07-29-2013, 06:28 AM   #11
dchmelik
Member
 
Registered: Nov 2008
Location: Washington state, USA
Distribution: BSD, GNU/Linux (Slackware, etc.,) openSolaris
Posts: 195

Original Poster
Rep: Reputation: 21
Quote:
Originally Posted by TobiSGD View Post
I extensively work with USB devices on Windows machines and this never happened to me. Therefore I mentioned that this may be just coincidence and the device was dying anyways.
It was a completely new Lexar (Micron) drive. The problem with pulling out USB flash drives when they are not finished being written to (even if their lights are not flashing) has nothing to do with whether the partition table is changed--it has to do with hardware. You get results similar to if you had pulled a floppy disc out when it was being written to, and like cancelling an optical disc writing session in the middle of it.

Last edited by dchmelik; 07-29-2013 at 06:34 AM.
 
Old 07-29-2013, 06:38 AM   #12
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 6,959
Blog Entries: 52

Rep: Reputation: Disabled
According to the rough notes I made at the time:
I had the Slackware tree i ~/temp, then ran (as root):
Code:
usbimg2disk -f -s /home/brian/temp/Slackware-14.0 -o /dev/sdb
/dev/sdb was a 8GB SanDisk Blade. Installation on an Asus eeepc 1001HA was successful.
 
Old 07-29-2013, 08:21 AM   #13
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,014

Rep: Reputation: 146Reputation: 146
Quote:
Originally Posted by dchmelik View Post
so apparently my criticism may be correct!
Apparently not, as I have already made clear in my previous post.
 
Old 07-29-2013, 05:30 PM   #14
dchmelik
Member
 
Registered: Nov 2008
Location: Washington state, USA
Distribution: BSD, GNU/Linux (Slackware, etc.,) openSolaris
Posts: 195

Original Poster
Rep: Reputation: 21
Quote:
Originally Posted by guanx View Post
Apparently not, as I have already made clear in my previous post.
Read the official Slackware script BrianL mentioned, and take a look at the partitions TobiSDG mentioned were created on his USB flash drive by following the README.

Last edited by dchmelik; 07-29-2013 at 05:34 PM.
 
Old 07-30-2013, 03:04 AM   #15
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,014

Rep: Reputation: 146Reputation: 146
Quote:
Originally Posted by dchmelik View Post
Read the official Slackware script BrianL mentioned, and take a look at the partitions TobiSDG mentioned were created on his USB flash drive by following the README.
The README only tells you something can be done in some way. It does not say other ways are forbidden.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Slackware on usb flash drive rng Slackware 2 06-28-2013 11:39 AM
[SOLVED] USB Flash drive issue utanja Linux - Virtualization and Cloud 3 06-15-2013 04:40 AM
Attempting to boot Slackware from USB flash drive, getting kernel panic error hairykoala Slackware 11 02-25-2009 07:46 PM
Strange USB flash drive issue ValidiusMaximus Linux - Software 2 01-05-2005 03:30 PM


All times are GMT -5. The time now is 07:06 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration