Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've tried to set a bootable flag on a usb stick using fdisck but it doensn't seem to work:
Quote:
sudo /sbin/fdisk /dev/sda1
Command (m for help): a
Partition number (1-4): 1
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 22: Invalid argument.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
Then when I try to install the XO-LiveCD on it, I get the error message:
Quote:
sudo ./make_usbstick.sh -n 0 -i -d /dev/sda1
device /dev/sda1 does not have bootable flag set
How should I manage this?
thanks in advance for any advice.
The number of cylinders for this disk is set to 2796.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): a
Partition number (1-4): 1
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
That looks fine, but if you want to boot from the device, you will need some sort of boot sector like syslinux. syslinux was the only thing I managed to get working with my USB stick when I installed ubuntu onto it, although I should point out that I had to get a customised kernel/initrd to get it working.
-d <device> usb device, default: /dev/sda
-n <partition> partition number to be used, default: 1
use 0 for if you don't have a partition table
-m <master-directory> LiveBackup master directory, default: /mnt/media
if you convert a Live-CD this is the CD mount point
-c <bootloader-config-file> default: /mnt/media/boot/isolinux/isolinux.cfg
-h help
-u update an already prepared stick
-s speedup updates, copy system images only if they differ in size
-i use isolinux bootloader, (recommended for general purpuse)
-g use grub bootloader, (recommended for development)
EXAMPLE:
./make_usbstick.sh -n 1 -i -d /dev/sda
this will copy the content from /mnt/media
to the first partition of device /dev/sda and use the isolinux bootloader
But I get either
Quote:
sudo ./make_usbstick.sh
which: no parted in (/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/christophe/bin)
INFO: you need to start fdisk or parted and set the bootable flag
on device partition /dev/sda1
or
Quote:
sudo ./make_usbstick.sh -n 0
device /dev/sda does not have bootable flag set
Your real problem is you need parted for the script to operate properly. Install parted. If it is already installed, add it to your path.
Thank you! I didn'see the message regarding parted. That was indeed the problem. Now I'm faced with another one. The problem is that the error maessage isn't saying much and I don't know what the problem could be :
Quote:
sudo ./make_usbstick.sh
Attempting to run 'parted /dev/sda set 1 boot on'... DONE
File: Readme.LiveBackup was not found on /mnt/media
Please check your configuration !!!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.