LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-07-2012, 12:14 AM   #1
greatbear
Member
 
Registered: Feb 2012
Distribution: ubuntu
Posts: 44

Rep: Reputation: Disabled
USB Sticks note to self. Boot viruses? Probably not, but I'll take precautions.


This isn't a question but a few words about my recent experiences with formatting usb sticks and struggling to make bootable media. This is not intended to help people who are struggling with a problem, so if you are having a problem don't bother to read this. Its more like a journal entry about the slow process of learning to deal with my system. I may add more material later. If I can I'll make a thread about how to make usb sticks the right way. Feel free to comment if there is some resource you'd like to suggest that I read.

I have had intermittent luck with installing boot media inside Windows Vista using the 'linux downloader' as well as with Fedora's program to do the same thing. Its a cool idea though, and other people have used both successfully. I did get a good solid install of Fedora 16 i686 32-bit out of 'Linux loader' a day ago, but today I tried installing with it and something went wrong with the squash filesystems. I tried several kinds of images. I even tried downloading the same image I'd gotten before but got the same problem where the media started booting but then could not read the squashfs. What had changed?

Fortunately, I already had grub installed on a stick and had a working version of Fedora on a hard drive partition accessible through a usb stick from the previous day (Fedora on hard drive, boot loader on a stick), so I decided to learn how to create boot media from within the working system from the command line. One thing I noticed was that the usb sticks that I'd used with the linux downloader today had four or more partitions, including some of zero length. I thought that was weird. I tried following Fedora's info on preparing boot media (chapter 3.2 for version 16), however while using dd my computer cut off suddenly. Very strange, possibly due to the undocumented nature of Toshiba laptops. Its very difficult to write drivers for undocumented hardware, or so the programmers say.

I removed the partitions of the offending sticks and created one large vfat, marked it bootable, wrote the new partition table and exited fdisk. Then I formated using the mkfs.vfat command, and finally I installed grub2 (to overwrite the boot sector). I don't know why there were 4 partitions on each usb stick, and I fear boot sector viruses from windows or from the downloader program. No idea, but hopefully installing grub from within a working fedora system on a new partition will overwrite any such windows based boot sector virus. Now all of that has taken a chunk of time, so I will not be able to finish the story today.

I believe what I will try next (to make bootable media from within Fedora) is use dd with an iso image following the 3.2 instructions again, but this time I will occasionally suspend the process to let the system cool down. (Also, I've hopefully replaced the boot sector and erased any sneaky partitions.) Previously at the first attempt with the dd command my system shut off during the dd. Probably the reason it shut down the first time was that the dd was too high priority and prevented acpi from turning the fan on. Or...there was something bad on the usb stick, or there was some kind of interrupt mixup. I'm not sure if a boot sector virus would affect dd, because I don't know how the device driver works.

One more thing. In order to use the dd command at all I had to copy the image file out of my home folder. For some reason a regular user is not able to use dd on a usb drive, and I had some trouble getting the root user to use dd on a file in the home directory. Perhaps I was not typing the command in properly, but perhaps there are restrictions on root and files in the home dir. For now it can wait.
 
Old 04-07-2012, 02:38 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
LQ offers (personal) blogs. This would seem better placed there.
 
1 members found this post helpful.
  


Reply



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
[SOLVED] Automount USB sticks? JZL240I-U Linux - Desktop 18 01-06-2011 01:50 AM
pimp usb sticks mecelec415 Linux - Desktop 6 01-29-2010 07:33 AM
Best supported USB WLAN sticks MS3FGX Linux - Wireless Networking 4 04-17-2006 01:40 PM
USB memory sticks island_dude Linux - Hardware 1 01-20-2004 11:16 AM
Mounting different usb-sticks robertmarkbram Linux - Hardware 3 10-22-2003 07:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:53 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
Open Source Consulting | Domain Registration