LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-02-2018, 04:58 PM   #16
helturus
LQ Newbie
 
Registered: Dec 2017
Posts: 13

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by WilliamFSimmons View Post
helturus,

i just looked at the reported error messages again. did you build the initramfs? it is conceivable that the kernel, or initramfs does not have scsi_transport, or does not load it. either the kernel or the initramfs would also need the filesystem that is currently on the flash drive to read it. are you giving the kernel (on the commandline) the correct device of the usb drive? are you trying to boot from this device?

still seems like hardware stuff, though.

wfs
You seem much more advanced in Linux understanding than I am. I don't understand all that your are telling me, but I appreciate your responses very much. I didn't mess with the initramfs, it only appears after a complete install of a distro and reboot. What I can tell is that I verified the USB ports and my PC has two 2.0 and one 3.0. I tried them all and still got the same result. Yes, I am trying to boot from the fashdrive and what bugs me is that I am able to install a complete distro on my DataTraveler G4 3.0 32Gb USB drive whereas it doesn't work with the Sandisk Ultra 3.0 64 Gb. The funny thing is that I bought a twin pack of the same product (two 32 Gb Sandisk 3.0 flashdrives) and I am able to boot on one of them and not with the other (same "initramfs" prompt).
 
Old 01-03-2018, 02:49 PM   #17
WilliamFSimmons
LQ Newbie
 
Registered: Nov 2017
Location: Van Horn, Texas
Distribution: Slackware, Gentoo
Posts: 15

Rep: Reputation: Disabled
query for more details

helturus,

ok, I just read the entire thread again. it looks like you are using this 64G Sandisk to load a distro on, and then trying to boot from it. if that is correct, I would like to know if you have loaded any other distro on this 64G Sandisk? did it boot after loading the other distribution? did it give you these error messages?

if you decide to load another distro, zero out the entire device first (described above). if it gives you error messages when trying to boot another distribution, you can bet you have a bum device.

You should know that I have been doing the same sort of thing recently, but with Slackware and Gentoo. I have used mostly Sandisk devices (16,32,64G devices) without incident. but I _always_ zero out the entire device. probably paranoid, but they _are_ out to get me :^) . I like to know where I am starting from. Although I have x86_64 machines, I am currently using legacy boot (MBR) instead of UEFI. But I have a few that use UEFI boot. BTW, it _is_ possible to switch back and forth between legacy and EFI boot without losing all the information (for example for Windblows). I wrote down everything (including options not chosen) before changing anything.

Also, a 32G, and even a 16G device (as mentioned by others) is big enough for a distro, but a 16G won't leave you much room. but it will cost you much less.

if the errors persist, try to return it. who knows, they might replace it.


Good luck,

wfs
 
Old 01-05-2018, 09:36 AM   #18
helturus
LQ Newbie
 
Registered: Dec 2017
Posts: 13

Original Poster
Rep: Reputation: Disabled
Here is what I did:

1- I reformated my 32 Gb flashdrive that doesn't work with FAT32.
2- I then wrote "sudo dd if=/dev/zero of=/dev/sdc bs=512 count=1" in a terminal (sdc being my flashdrive).
3- I then made a complete Xubuntu install on the drive.
4- I rebooted on the flashdrive and still got the "initramfs" prompt.
5- I reformated the drive with FAT32 again.
6- This time I used "sudo dd if=/dev/zero of=/dev/sdc bs=512 count=4".
7- I got a root filesystem issue so I could not go further.
8- I repeated the 1, 2, 3 steps with PCLinuxOS and Fedora but the install process crashed with both at the end.
9- I tried the same with Mageia, but I get back to the Grub menu each time I chose the install partition.

I wonder if there is something else I can do.

Thanks.
 
Old 01-08-2018, 03:10 PM   #19
WilliamFSimmons
LQ Newbie
 
Registered: Nov 2017
Location: Van Horn, Texas
Distribution: Slackware, Gentoo
Posts: 15

Rep: Reputation: Disabled
please hold on, i'll find some notes you might need....

helturus,

I got your last reply. There is always something else that can be done.

Let me just ask you directly: Did you get the error messages with negative addresses again?

I am going to suggest a complete configuration. Let me get my notes together, and I'll be back with you.


wfs
 
Old 01-08-2018, 04:17 PM   #20
helturus
LQ Newbie
 
Registered: Dec 2017
Posts: 13

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by WilliamFSimmons View Post
helturus,

I got your last reply. There is always something else that can be done.

Let me just ask you directly: Did you get the error messages with negative addresses again?

I am going to suggest a complete configuration. Let me get my notes together, and I'll be back with you.


wfs
Yes, only with Xubuntu. Thanks for taking the time.
 
Old 01-15-2018, 04:35 PM   #21
WilliamFSimmons
LQ Newbie
 
Registered: Nov 2017
Location: Van Horn, Texas
Distribution: Slackware, Gentoo
Posts: 15

Rep: Reputation: Disabled
helturus--


Sorry for the delay. Some urgent things came up.

I read your response detailing what you had done. I noticed a few
things that I had not noticed the first time I read it. They had to
do with the order in which you formatted, and zeroed out the MBR.

First of all, "formatting" is concerned with writing an empty
filesystem onto a partition, in your case a filesystem called fat32
(vfat). Formatting and then turning around and zeroing out the MBR
makes no sense.

Let's go through the steps in the order that they should happen.

First of all, if you want to zero out the entire device, that should
happen first. Under most circumstances, there is no need to do this,
unless you profoundly mistrust the device for some reason. I confess
that I always do this before I install a new OS on it. Like I said
before, I like to know what I am starting with. Other people will
doubtlessly remark that this step in unnessesary, and they are right.
You have had some weird errors that seem very low level. I think you
should do this if for no reason other than to assure yourself that you
are starting with a clean slate. I do it for shamefully paranoiac
security reasons.

To zero out the entire device, execute the following command:

# dd if=/dev/zero of=/dev/sdX bs=512


This step can take hours to complete.

At this point the device has nothing on it, no partitions, no
filesystems, nothing!

You could run your installation at this point and have the
installation program do the rest. I like to do it myself, because I
have complete control over how the device is set up. If you just want
to go with the flow, run the OS installer, and accept what you get.
Otherwise, things should happen as detailed below.

The next thing that needs to happen is to partition the device. Most
Linux systems have been on an x86 platform of some sort. Because of
limitations of the BIOS and the original legacy MBR (Master Boot
Record), the first partition is normally used to place the code
executed during boot-up close to the beginning of the device. The
reason for this is that the BIOS cannot point to an address any bigger
than can be expressed by a 32-bit number. Depending on whether that
number is signed or unsigned, the limit is either 2G, or 4G. You are
formatting a 32G device. The kernel has to be close to the beginning
of the device. We accomplish this by putting both the secondary boot
code, the kernel, and the initramfs in the first partition.

Here is the partition scheme that I currently use:

(assume /dev/sdb is the target device)

# Device MntDir Size
/dev/sdb1 /boot 1G
/dev/sdb2 swap 2G
/dev/sdb3 / rest-of-disk

All the boot-code goes in /boot.

Remember, if I understand you correctly, we are talking about having
the entire distribution on a removable device, probably to be used to
boot up a laptop of some sort. This is obviously not the sort of
partition scheme that you would want to use on a large multiuser
server.

In order to partition the device, you would use fdisk for legacy boot
systems, or gfdisk or parted (partition editor) for the newer EFI
boot. If you are using a legacy boot, the filesystem of /dev/sdb1
should be ext2. If you are using UEFI boot, the filesystem should be
vfat. Additionally, this is the partition that should be marked
active.


Here is the partition report of fdisk on one of my SandiskFit32G
devices:

# fdisk -l /dev/sdb
Disk /dev/sdb: 30.8 GB, 30752636928 bytes
64 heads, 32 sectors/track, 29328 cylinders, total 60063744 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: 0xd4b470f1

Device Boot Start End Blocks Id System
/dev/sdb1 * 2048 4196351 2097152 83 Linux
/dev/sdb2 4196352 8390655 2097152 82 Linux swap
/dev/sdb3 8390656 60063743 25836544 83 Linux


You might notice that /dev/sdb1 is 2G on this device. Even with
several kernels on it, it still is only 7% used. I will not use 2G as
the size for the boot directory again. Also note that /dev/sdb1 is
marked active (*).


After you have partitioned your device, a filesystems should be
written to each partition.

# mkfs.ext2 /dev/sdb1 (legacy boot)
# mkfs.vfat /dev/sdb1 (UEFI boot)
# mkswap /dev/sdb2
# mkfs.ext4 /dev/sdb3


At this point, you can mount your root filesystem, and create the
/boot directory:

# mount -t ext4 /dev/sdb3 /mnt/dist
# cd /mnt/dist
# mkdir boot

At this point, you are technically finished, and ready to install the
distribution. As I mentioned before, I tend to be very paranoiac, and
so I will show you what else I do. I have been able to save machines
that would otherwise have been "bricked" if I had not done these
things.

Let's say that you have decided to follow me into insane paranoia.

Again, at this very point, let's create the /root directory for user
root.

# pwd
/mnt/dist

We are still at the root of the future target distribution. Let's
make root's home directory.

# mkdir root
# ls
boot root

Good. Let's get into the home directory of user root.

# cd root
# pwd
/mnt/dist/root

Ok. Let's save the Master Boot Record (this is for a legacy
machine).

dd if=/dev/sdb of=machine-dist-fdisk-yyyymmdd.mbr bs=512 count=1

machine = laptop mfg
dist = distribution
yyyymmdd = date 20180115

Just to make sure you understand, I will show you one of my own names:

acer431-slk14.2-fdisk-20180115.mbr

Don't name it something stupid. Use a name that actually means
something. I can tell from the name of the file that it is an MBR
(.mbr). I know which machine it is for. I know that it is for a
Slackware 14.2 operating system. And I know what date I did the
partitioning. Beware of relying on the timestamp. For one, the date
could be wrong. Secondly, it can be destroyed by a careless copy.
Put the date in the name.

You now have the actual partition table of the target distribution.
You can use this, in a pinch, if something happens (or if you screw
up). This is not theoretical. I have saved myself from disaster by
using this very trick.


You can do something similar with fdisk:

Still, in the home directory of user root:

# fdisk -l /dev/sdb > acer431-slk14.2-20180115.fdisk

Now you have the final version of your partition scheme as reported by
fdisk. If something happens to your MBR, you could, in a pinch,
re-execute fdisk, using the sector numbers in this report, and write a
new MBR to this device. You should think about this. Just because
you zapped your MBR doesn't mean, necessarily, that you have "bricked"
your machine. Everything is still in the same place that it was.
Your MBR is just missing, or corrupted. If you point to the original
starting places of the original partitions, everything will still be
there. I have also saved my own neck by using this trick. It works.


After you have installed your distribution, you might want to copy
your /etc/fstab to root's home. I have long used a file that I name
"this-machine" to keep this kind of information. I keep a version in
/root, one in /boot, and one in /etc.

Here is one of my "this-machine" files:

--------
Device: Sandisk Ultra Fit 32GB
Machine: Acer Cloudbook Aspire One 431
Operating System: Slackware Linux 14.2, Linux 4.4.14
Hostname: vapor.heliothermatics.com
uname-a


# fdisk -l /dev/sdb
Disk /dev/sdb: 28.7 GiB, 30752636928 bytes, 60063744 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
Disklabel type: dos
Disk identifier: 0xd4b470f1

Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 4196351 4194304 2G 83 Linux
/dev/sdb2 4196352 8390655 4194304 2G 82 Linux swap
/dev/sdb3 8390656 60063743 51673088 24.7G 83 Linux


#/etc/fstab
#
/dev/sdb1 /boot ext2 defaults 1 2
/dev/sdb2 swap swap defaults 0 0
/dev/sdb3 / ext4 defaults 1 1
--------

There are more reasons other than shameful paranoia for doing this.
These things can wind up saving your @ss.

Cheers,

wfs
 
Old 01-23-2018, 03:40 PM   #22
helturus
LQ Newbie
 
Registered: Dec 2017
Posts: 13

Original Poster
Rep: Reputation: Disabled
I tried # dd if=/dev/zero of=/dev/sdc bs=512. It did take a while to process. I got error messages. I nevertheless installed Lubuntu on the flashdrive. After reboot, I got the Grub menu, and then entered on the right partition. I waited a long time, but got stucked with a black screen.

I will restart the steps and will come back with the error messages I get.
 
Old 01-24-2018, 12:41 PM   #23
helturus
LQ Newbie
 
Registered: Dec 2017
Posts: 13

Original Poster
Rep: Reputation: Disabled
Results

Here are my results. It's in French, but I can translate if necessary. After entering the command "dd if=/dev/zero of=/dev/sdb bs=512" where sdb is my flashdrive, I get an error message showing there is no available space on the device. I was using my 64Gb stick. Please help if you can.
Thanks.
Attached Thumbnails
Click image for larger version

Name:	Capture du 2018-01-24 13-33-42.png
Views:	4
Size:	106.2 KB
ID:	26802  
 
Old 01-24-2018, 02:20 PM   #24
WilliamFSimmons
LQ Newbie
 
Registered: Nov 2017
Location: Van Horn, Texas
Distribution: Slackware, Gentoo
Posts: 15

Rep: Reputation: Disabled
dd error message

helturus--

ok, I see what you're saying, thanks to to screen printout. It seems to me that this error message is pretty much par-for-the-course if you leave dd to figure out how many sectors to zero out. (Note that we did not include the directive "count=NNNN" in the dd commandline.) I have myself gotten this error message when invoking dd without a count=N specification. It is nothing to worry about. dd emits the message when it hits the last sector. It does not happen if you specify how many sectors to write.

Congratulations! you have a zeroed-out device.

wfs.
 
Old 01-24-2018, 04:58 PM   #25
helturus
LQ Newbie
 
Registered: Dec 2017
Posts: 13

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by WilliamFSimmons View Post
helturus--

ok, I see what you're saying, thanks to to screen printout. It seems to me that this error message is pretty much par-for-the-course if you leave dd to figure out how many sectors to zero out. (Note that we did not include the directive "count=NNNN" in the dd commandline.) I have myself gotten this error message when invoking dd without a count=N specification. It is nothing to worry about. dd emits the message when it hits the last sector. It does not happen if you specify how many sectors to write.

Congratulations! you have a zeroed-out device.

wfs.
Thanks. I'll then run the OS installer once again and see what happens.
 
Old 01-26-2018, 02:41 PM   #26
helturus
LQ Newbie
 
Registered: Dec 2017
Posts: 13

Original Poster
Rep: Reputation: Disabled
I zeroed out my flashdrive again and proceeded with a complete install of Mint XFCE. After reboot, I got the grub menu and after the Mint logo. But then got back to that "initramfs" prompt.
 
Old 02-01-2018, 09:06 PM   #27
helturus
LQ Newbie
 
Registered: Dec 2017
Posts: 13

Original Poster
Rep: Reputation: Disabled
Here's the answer I got from Sandisk customer support after exposing my trouble:

"Thank you for contacting SanDiskŪ Global Customer Care. I understand your concern, I would like to inform you that I would like to inform you that all the SanDiskŪ storage device are plug and play device. They do not require any additional driver or application to run. Please to be inform that SanDiskŪ do not recommend to use our flash drive as a bootable drive as we do no have expertise on".

There I go. I should have checked if the drive was bootable before buying.
 
  


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
USB boot problem flashdrive and hdd installed linux oldrifle Linux - Laptop and Netbook 8 11-12-2014 03:17 PM
[SOLVED] Slackware Install -probable Grub problem- boot OK from Flashdrive mrmarria Slackware 3 03-24-2013 08:54 PM
Boot problem initramfs error in ubuntu 10.04 Lucid sanjay87 Linux - Server 1 08-18-2012 04:55 PM
how to boot ubuntu when there is a degraded RAID5 without initramfs stoppin the boot dvah Linux - Software 0 07-15-2012 12:15 PM
Boot problem - "Gave up waiting for root device.", (initramfs) for ubuntu 9.10 kumar116 Linux - Hardware 2 06-21-2010 04:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

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

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration