Programming :: Fail To Write To USB Device Boot Sector / What To Do?

Jul 4, 2010

I'm writing a C program that reads the boot sector of a USB disk. (it is mounted as /dev/sda1). I'm able to read the sector, by the calls code...

The problem is when I wish to write. I use the call:
bytesWrite = write(fd, buf, 512)
The 'write' returns the value of 512, which looks as if the write was successful, yet
when I read again the /dev/sda1 device, I see that no writing was actually made.

Can anybody tell me what do I need to do in order to allow an actual write to the
device?

View 2 Replies


ADVERTISEMENT

Ubuntu Installation :: No Boot Sector On USB Device

Dec 19, 2010

My old Dell Inspiron 9300's CD Rom is no longer working. I've written the files to my 8GB USB device, and attempted to boot from it. Whenever I try, I get this "No boot sector on USB device". I'm also using Mac OS X to make the USB drive.

View 3 Replies View Related

Ubuntu :: Fatsort - Sort_fs: Device Or Resource Busy - Cannot Read Boot Sector Or Headers

Feb 14, 2011

I have an audio recorder that doubles as a music player. It can play WAV files. So I put in some WAV files and they are out of order, even if they are named numerically. Read somewhere about a little CLI software called fatsort so I installed. The device is located at /dev/sdc. So naturally I write fatsort /dev/sdc, it says something about permission. So sudo fatsort /dev/sdc. Thing is, it says:

Code: sort_fs: Device or resource busy! If I "eject" it (unmount) then it says something about cannot read boot sector or headers. On Windows there is FAT Sorter. It does not work in WINE. So every time I put something in, I have to get to a Windows computer to sort it. It seems like fatsort is the only program that sorts FAT systems in Ubuntu/Linux.

View 1 Replies View Related

Ubuntu Installation :: Bootloader To Usb Hard Drive - Error "no Boot Sector On Usb Device"

Apr 8, 2011

I am trying to install Ubuntu to an external usb hard drive (WD Elements SE). I am also choosing to install the grub bootloader to this disk (/dev/sdb) because I do not want anything modified on the internal drive. The installation appears to go okay, but when I try to boot to the usb drive, I get the error, "no boot sector on usb device" and it immediately falls back to my interal drive. I have tried this installation with both 10.10 (amd64) and 11.04 (amd64). How can I fix this?

View 7 Replies View Related

Programming :: Write USB Device Driver?

Oct 11, 2010

I know, I know..."How long is a piece of string"?

I have one of these devices:

[URL]

Of course, it's Windows only, and XP only at that. However, the data that needs transferred between the device and the computer should be fairly basic, unless it offloads a lot of processing to the computer. I'm not a programmer, nor do I play one on TV, but I have written some fairly complicated microcontroller programs and some basic Java GUIs. Besides writing the actual code, how hard is it to do whatever needs done to make a Linux device driver, apart from the code to make the device work?

View 2 Replies View Related

Programming :: Timer Of 10 Ms For Read / Write A USB Device?

Apr 13, 2011

I need programmer a timer of 10 ms for read/write a USB device

View 4 Replies View Related

Programming :: Block On Write Call To TtyACM Device

Nov 1, 2010

I have a write call to a ttyACM serial device that blocks after several hundreds bytes are written.I'm writing in ~25 byte chunks, so I have 5-8 successful writes, then the next write blocks forever.I can bypass the blocked call using select, but I can never call write again without closing and re-opening the port.

The serial port is opened correctly because I can read from it just fine. Write permissions are correct, and it's opened RW.The code is likely correct because I tested the same code using the same device on a pure RS-232 serial port, and it worked fine - no block. Is there anything to know about the linux ACM module?It's my understanding that write calls basically shouldn't block.They're supposed to return -1 if there's an error.

View 1 Replies View Related

Programming :: RHEL5 - Project To Write Device Drivers

Dec 1, 2010

I am final year MCA student. I like to do my project in Linux. I know a little in C. I am pursuing RHCE certification. I am using rhel5. I am interested to write linux device drivers and willing to do my project in that.

View 9 Replies View Related

General :: Write File To A Specific Sector?

Jun 28, 2010

I need to copy a file into a Flash memory which is connected to my computer via USB. The file must start at a specific sector.
Can anyone guide me how to do this? (it can be through a C program, a line command, or any other way)

View 8 Replies View Related

General :: Cannot Read / Write SD Card After Improper Format (sector Size 0) - Fix It?

Jun 12, 2011

I was attempting to reformat a 16GB MicroSD card in my camera when the battery died mid-way. After that, any time I try to read the card in my camera, it gives me a "Card Error" and does not allow me to reformat it in my camera.

So, I thought I would plug the camera in to the laptop with it set to host the card as media when plugged in as USB, in an attempt to fix the formatting issue.

However, when I plug it in to my linux machine, it does not register as a device (e.g., /dev/sda) due to some errors, therefore I cannot reformat it. Essentially, I think I need to fix the partition table but I'm not sure how to when it doesn't register as a device. code...

View 7 Replies View Related

Ubuntu Installation :: Device /dev/sbd Has A Logical Sector Size Of 4096?

Jan 16, 2010

So when i install ubuntu it gets to 47% and than i get this error message. After that the install doesn't really seem to do much.Code:Device /dev/sbd has a logical sector size of 4096. Not all parts of GNU Parted Support this at the moment, and the working code is HIGHLY EXPERIMENTAL.Now i did search and i found another topic where someone had the same problem. His solution was to reburn the CD and try again. I did that and it still got me the same messageP.S. I do have two boot options now however. One for ubuntu and one for windows though i already ran the uninstall.

View 1 Replies View Related

Ubuntu :: Reboot And Select Proper Boot Device Or Insert Boot Media In Selected Boot Device And Press A Key

Apr 16, 2011

Reboot and select proper boot device or insert boot media in selected boot device and press a key. I got this error after: Reducing my Windows 7 partition by about 100gb. Creating a new partition (100gb) and copying my Ubuntu partition (10gb) to the new partition. After it was copied, and pasted, the original partition was deleted. I now had two partitions a new 100gb Ubuntu partition and a 600gb (or so) Windows 7 partition.

All of this was done using a bootable USB with Ubuntu 10.10 and GParted partition editor. Now when I boot I get the "Reboot and select proper boot device or insert boot media in selected boot device and press a key." error.

View 9 Replies View Related

Fedora Installation :: 10 - WDE And Dual-Boot - Boot Sector Is Occupied By WDE Software (TrueCrypt)

May 17, 2009

I currently have XP installed on a NetBook (Samsung NC10), and would like to run Fedora on it. I'm currently looking at putting Fedora onto a flash memory card to test it works OK on the hardware, before installing it to the hard disk. The problem I've got is that the boot sector is occupied by WDE software (TrueCrypt). Will this pose a problem for dual-booting XP with Fedora, or will GRUB move the boot loader in the usual way?

View 2 Replies View Related

Ubuntu Installation :: Grow Boot Sector. Delete Swap Partition. Can't Boot Afterwards.

Mar 7, 2010

I'm running 9.10 off of a 4 GiB CF card. I keep running into space issues with updates, so I purchased an 8 GiB replacement card. I've cloned the 4 GiB card to a .IMG file using DD.I've then copied the 4 GiB image back to the 8 GiB card using the Ubuntu startup disk creator program. Once done, I'm able to properly boot off of the new 8 GiB clone.Unfortunately, the clone ends up with 3.67 GiB of unallocated space at the end *see attached). I tried deleting the "extended" partition that the swap is located at after booting from a Live CD and the system was unable to boot after this. I was thinking that I would delete the swap entirely and create a swap file after I merged the existing partitions, but I was unable to do this.

best way to do this (e.g. get one large 8 GiB partition with my old image on it)? I still have the original untouched 4 GiB card and also have an external CF drive if I need to redo the cloning. I've also used Clonezilla before, so perhaps there's a way to do this that allow me to grow the image as it's being cloned.

View 1 Replies View Related

General :: Boot Sector Of Installed Vector Linux Doesn't Have Boot Signature

Feb 13, 2011

upon adding the installed VL on the existing LILO.. (btw i have not installed its LILO on the installation setup) since i know that i will just add it to the "existing" LILO the error above arises upon doing the lilo run command.$adding Vector6.0 etc.FATAL : Boot sector of /dev/hdc13 doesn't have a boot signature.i have tagged the /dev/hdc13 bootable via CFDISK. but same problem arises..

View 8 Replies View Related

Programming :: Copy Files To Floppy In Specified Sector?

Jan 4, 2010

I am trying to make small kernel. I have written many programs and produce many .bin and .o files but what I want that to load every file from a specific location in specific sectors but don't know how to do that in linux , in dos same can be done by debug command.If It is not possible to achieve the specific location criterion please tell me how can I just copy many files serially to a floppy image.I have another question that if files are copied in floppy. How could I know in which sector the file has been loaded in floppy so that I can retrieve them by BIOS interrupt INT13.

View 7 Replies View Related

Programming :: Small C++ Project - Disk Sector Viewer?

Jun 2, 2011

I have a small project that I am trying to do for my job to help us out. Basically, I need to make a tool that lets me view all the sectors of a hard drive in hexadecimal format to make sure they are all zero after a low-level format. I need it to be very minimal, and display the data in a way that I can scroll down and skim through the sectors. Doesn't have to be pretty, just functional.I need it to do more things down the road, but this is the first hurdle I need to overcome. I would like to create a GUI interface so it looks nice, but first I am only concerned with the sector viewing function. I am not entirely sure where I should start.

I see there is a tool called dd I could use to read the hard drive and I am wondering if I need to use that, or if I can just open /dev/hda as a file and be able to view all the sectors that way.Also, just to clarify, I am wanting to write this tool for linux,specifically DSL. I need it to be a very small distribution that can be loaded quickly from a usb drive, cd, or over the network with PXE.

View 15 Replies View Related

Server :: NFS Service Start Fail - No Such Device

Dec 23, 2010

rhev-h starting NFS service why occur under issue message?
[root@RHEV ~]# /etc/init.d/nfs start
Starting NFS services: exportfs: can't open /var/lib/nfs/rmtab for reading [OK]
Starting NFS daemon: [FAILED]
[root@RHEV ~]# tail /var/log/messages
2010-12-23T09:32:20.507146+00:00 RHEV exportfs[7834]: can't open /var/lib/nfs/rmtab for reading
2010-12-23T09:32:20.562458+00:00 RHEV modprobe: WARNING: Could not open '/lib/modules/2.6.18-194.3.1.el5/kernel/fs/exportfs/exportfs.ko': No such file or directory
2010-12-23T09:32:20.562508+00:00 RHEV modprobe: FATAL: Error inserting nfsd (/lib/modules/2.6.18-194.3.1.el5/kernel/fs/nfsd/nfsd.ko): Unknown symbol in module, or unknown parameter (see dmesg)
2010-12-23T09:32:20.563344+00:00 RHEV nfsd[7838]: nfssvc: No such device

View 5 Replies View Related

Programming :: After USB Boot - Detect Which Device The Ramfs Was Loaded From - Bash Or Python

Sep 22, 2010

How one could determine (for use in a Bash or Python script) which device (eg /dev/sda1, /dev/hda1... etc) a ramfs was loaded from when booting from a USB drive.

I have a RIPLinux/Tinycore live USB disk that automatically needs to run a script that is stored on the same USB drive but not part of the RIPLinux/Tinycore image. (Please note that I do not want to put this script into the RIPLinux image.) I therefore would like to remix the RIPLinux/Tinycore ISO to automatically run this script once it has started up. After RIP linux has booted I would like to automatically mount the USB drive that RIPLinux/Tinycore was booted from. I need help detecting which device this is.

View 3 Replies View Related

Ubuntu Installation :: Disk Space - Failes On A "E: Write Error - Write (28 No Space Left On Device)"

Jan 4, 2011

df -h [URL] I did the following command to find everything is in /usr or /var, then tracked it down to /usr/lib and /usr/share as the main offenders, but out of all the directories none are more than 1mb or so.

du -sh /* | sort -gr | head -n 5

I tried to uninstall firefox, which is what got me in this mess in the first place, the log claims it will remove ~240 mb but failes on a "E: Write error - write (28 No space left on device)" [URL] If I could juggle something onto an external hard drive so I can uninstall firefox I would be out of the wood. Failing that I believe a new install is in order.

View 1 Replies View Related

Debian Installation :: How To Copy USB Key Boot Sector To HD

Aug 20, 2010

I just installed squeeze from a usb key. Installation went flawlessly but now I need the usb key to boot. Nothing happens if I let the bios boot from the HD or if I force it to do so. When it boot up from the usb key, the HD is read and the boot up sequence continues. Grub seems to be installed in /boot/grub. I imagine that I have to copy the usb key boot sector to the HD but how?

View 3 Replies View Related

Ubuntu Installation :: No Boot Sector - Hit F1 To Retry

May 11, 2010

I have a rather puzzling error. I recently purchased an usb external hard drive with the intent of installing Ubuntu on it. I have had great success with installing various linux flavors on usb thumb drives but I need a little larger space for engineering applications that I use. Anyway, I removed my laptop's internal hard drive and installed ubuntu 9.10 on a recently formated external hard drive. Everything worked fine at first. Upon restarting I get an error that says "no boot sector" and it asks to hit either f1 to retry. When I hit retry, Grub loads most of the time. Occasionally it does not work. Is Grub just not installing correctly? I searched for this error but I found nothing that directly applied.

View 2 Replies View Related

General :: Want To Remove LILO On Boot Sector

Feb 24, 2011

Here's the set up.
1. Got an EXISTING LILO... VL 5.8 (/dev/hdc3)
2. Installed VL6.0 and installed its own lilo on Boot sector (/dev/hdc13)
3. Everytime I choose VL6.0 in my existing LILO (/dev/hdc3) it still goes to VL6.0's LILO. The question is, how can I remove the VL6.0 so if i choose this on my existing lILO. It will just boot straight.

VL6.0 LILO:
root:# cat /etc/lilo.conf
# LILO configuration file
# generated by 'liloconfig'
# Start LILO global section
boot = /dev/hdc13
#default = linux
#compact
#prompt
#timeout = 0 .....

View 3 Replies View Related

Networking :: Fail To Connect To WLAN With Realtek 8172 Device

Nov 9, 2010

I have a ThinkPad x100e with a wireless card.Code:03:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device 8172 (rev 10)my problem is that I can't connect to my wireless network with Gentoo. I've been running Slackware64-13.1 on this computer and now have Windows 7, Ubuntu and Gentoo installed. Slackware, Ubuntu as well as Windows 7 connect to the wlan without problems. I'm using the driver rtl8192se, the module is loaded r8192se_pci and is the same with Slackware and Ubuntu.

I've read many posts and found that other people experience problems with Realtek wlandevices as well. But I have no Idea how to get connected with Gentoo at my wlan. It looks like that the netbook is connected for a very short time, but when dhcpcd broadcasts for a lease the connection is already closed.

View 10 Replies View Related

Ubuntu :: Repair The Boot Sector From A Live-CD With Grub 2?

Jun 18, 2010

The boot sector somehow got messed up on a friends computer while updating. I used to know how to do it with the old version, but now that they've updated it and changed everything , how do you repair the boot sector from a live-CD with Grub 2?

View 5 Replies View Related

Ubuntu Installation :: Win7 Has Overwritten Boot Sector?

Apr 21, 2011

I have been running a dual boot system with Windows XP and Ubuntu 10.10 64 bit with the dual boot selected by Grub (placed y an Ubuntu install).

Recently I have installed Window 7 Home on a spare disc. My Bios allows me to select which disc to boot.

The Win7 installation has overwritten the boot sector on the WinXP/Ubuntu dic so that it is now not bootable.

I can sse all my Ubuntu files with a Live Linux Disc, so I can get all my files back.

Is there any easy way to re-install Grub or should I just do a clean install of Ubuntu, perhaps to a blank partition?

View 3 Replies View Related

General :: SuSe 11.3 Error - No Boot Sector Found

Feb 17, 2011

I recently installed 11.3 on an external drive. After adding some software in yast (searched Kernel and checked every option), I was prompted to reboot but the no boot sector found error came up. Tried reinstalling with the same result. Grub is boot loader

View 8 Replies View Related

Fedora Installation :: Install Didn't Create Boot Sector?

Jul 12, 2011

I installed Fedora 15 on a primary partition and expected the install to create a partition boot sector, but it didn't. Did I do something wrong or is this not supported?

View 13 Replies View Related

Ubuntu Security :: 9.10 (64bit) - Symptoms Of Boot Sector Infection?

Oct 20, 2010

I run 64 bit ubuntu 9.10. I recently rebooted my computer with a flash drive plugged into a USB port. My question is, could I have got a boot sector virus because of this? What are the symptoms of a boot sector infection? After the incident, I scanned the flash drive with clamav and it didn't detect any viruses. Also, in the BIOS, the hard drive is higher up in the boot sequence than USB mass storage drives. These two things suggest to me that a boot sector virus is improbable. But, recently, when I tried to boot into ubuntu, I got an error message saying that /dev/disk/uuid<some characters here> didn't exist.

Is this a symptom of a boot sector virus? So, I ended up re-installing ubuntu and I believe grub was written to the MBR. Will this have erased any boot sector viruses that were on my system? Can a boot-sector virus affect linux too? How can I check to see if I have a boot-sector infection? I also have windows xp on my computer. For some reason, windows xp isn't letting me install any updates, but this has been going on for since before the above incident with the flash drive and therefore I don't think that is due to a boot sector virus.

View 9 Replies View Related

Ubuntu :: Disk Formatted In Error - Boot Sector Repair

Nov 20, 2010

I was using the disk utility on Ubuntu 10.04 and wanted to make by 500GB external NTFS formatted USB drive into 1 x 50GB FAT32 and 1 x 450GB NTFS. I clicked the option that said format or create a partition and it basically wiped the whole thing in a split second leaving me with 500GB of seemingly empty space. Obviously the files are still there but I cannot boot the drive to view anything. I have downloaded testdisk, but don't know how to use it, but I am sure there is a relatively simple solution here. I am currently repairing the boot sector of the drive as Test Disk showed the drive as "no type" i.e. not FAT/NTFS/ext4 etc., but shows the correct amount of used space though, but I cannot view anything err go, I cannot use the undelete command as yet.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved