It is currently Mon Oct 20, 2014 1:10 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Missing Operating System?!?
PostPosted: Mon Jul 18, 2011 7:53 pm 
Offline

Joined: Sat May 08, 2010 5:26 am
Posts: 768
hack-wizard wrote:
So should I be able to simply add/replace files on the usb for the purpose of customizing it (for instance, antivirus definitions)?

Generally speaking, yes. But the antivirus definitions are a different story.

Antivirus tools are security tools, and as such, they use their own methods to be sure that they were not tampered with.

For example, in UBCD 5.0.3, the script for updating Avira stopped working once they updated the program to a completely ( and bloated IMHO ) different version that won't accept the updating method of the script.

The good news is that almost all antivirus rescue systems (included the latest Avira, AVG and others) will already contain some method to update the antivirus definitions from within the program itself.

If you find a problem with customizations of UBCD, my recommendation would be to search the forum, read the other sections of the UBCD website, read the UBCD Wiki, and if that doesn't work, open a new topic.

In any case, you need to take into account that you are using a beta version of UBCD (which is still better than older versions), and that most old topics are related to older UBCD versions. The current development series introduces some changes, so older topics and tutorials may need some "tweaks" to make them work correctly. In any doubts, ask :).


Top
 Profile  
 
 Post subject: Re: Missing Operating System?!?
PostPosted: Mon Aug 08, 2011 1:35 am 
Offline

Joined: Sun Jul 31, 2011 9:07 am
Posts: 11
Icecube wrote:
I think I found your problem, try this:
Code:
sudo /home/jwesleycooper/ubcd51b1-extracted/ubcd/tools/linux/ubcd2usb/syslinux --install --directory /boot/syslinux /dev/sdd1




This worked for me as well.

On the next scheduled release, I suggest you update /ubcd/tools/linux/ubcd2usb/readme.txt to reflect this.

I also recommend one additional step to be added to this file. I had to toggle the boot flag on the FAT32 partition.


Top
 Profile  
 
 Post subject: Re: Missing Operating System?!?
PostPosted: Sat Aug 13, 2011 9:12 pm 
Offline

Joined: Sat May 08, 2010 5:26 am
Posts: 768
I took the readme.txt file

ubcd511-extracted -> /ubcd/tools/linux/ubcd2usb/readme.txt

from UBCD 5.1.1.

I:
_ corrected some details;
_ formatted the text to be readable under Linux, Windows and DOS;
_ formatted the text to use no more than 80 characters per line (including spaces) ;
_ updated the syslinux installation command to be compatible with the version of syslinux currently included in UBCD;
_ added the necessary steps and command arguments to assure that the volume/partition is marked as active/bootable;
_ changed the way the steps are numbered so to present them in a more "systemic" order.

I add/quote here the text inside "code" tags, so to preserve every space character (before and after sentences and paragraphs). This should make the text more readable under different OSs.

There is still place for improvements, but if Victor wants, I think it could replace the current readme.txt "as-is" for now.

Tests and suggestions are welcome and desired.

Code:
To put UBCD on a USB drive, your USB drive needs to be partitioned in
FAT16 or FAT32.

In addition, UBCD uses syslinux/extlinux to boot from a USB drive.

Here is the general steps of the complete procedure:

1_ How is your USB drive device identified?
Which is its "device" identification letter?

2_ Prepare your terminal prompt and permissions for the next steps.

3_ If necessary, delete old partitions of the USB drive.

4_ If necessary, partition the USB drive.

5_ If necessary, format the partition (create the filesystem).

6. Write the syslinux MBR to the USB drive.

7. Mount the partition of your USB drive.

8_ Copy files to your USB drive.

9_ Install syslinux to the partition of your USB drive.

10_ Boot UBCD from your USB drive.


Now here is the explanation of the procedure, step by step.



1_ First we need to know on which device your USB drive is listed in /dev/.

Alternative procedures are presented here
so to achieve the same goal for this step: to ID the USB drive's device.

1.A_ Alternative procedure "A".

  1.A.1_ If you have already attached your USB drive, then
(Unmount and) Remove your USB drive from your USB port

  1.A.2_ If you need to gain root permissions, in a terminal prompt, type
            sudo su

  1.A.3_ In a terminal prompt, run:
            fdisk -l

You might need root permissions to see the drives. It should list all drives.
Since your USB drive is not attached, it will NOT be listed.

  1.A.4_ Re-attach your USB drive to your USB port.
If necessary, wait several seconds so the drive
is completely identified as connected.

  1.A.5_ In a terminal prompt, run again:
            fdisk -l

You might need root permissions to see the drives. It should list all drives.
This time, your USB drive is attached, so it should be listed too.

  1.A.6_ By comparing the 2 results of the "fdisk -l" command,
you should be able to identify the USB drive with a certain device.
Look also at the listed sizes to determine which one is your USB drive.


1.B_ Alternative procedure "B".


  1.B.1_ In a terminal prompt, run:
            dmesg | tail

This should display something like the following,
if you have just connected the USB drive.

[38350.743408] sd 9:0:0:0: [sdb] 4028416 512-byte hardware sectors (2063 MB)
[38350.744272] sd 9:0:0:0: [sdb] Write Protect is off
[38350.744284] sd 9:0:0:0: [sdb] Mode Sense: 23 00 00 00
[38350.744291] sd 9:0:0:0: [sdb] Assuming drive cache: write through
[38350.747289] sd 9:0:0:0: [sdb] 4028416 512-byte hardware sectors (2063 MB)
[38350.748267] sd 9:0:0:0: [sdb] Write Protect is off
[38350.748284] sd 9:0:0:0: [sdb] Mode Sense: 23 00 00 00
[38350.748289] sd 9:0:0:0: [sdb] Assuming drive cache: write through
[38350.748305]  sdb: sdb1
[38350.749432] sd 9:0:0:0: [sdb] Attached SCSI removable disk

In this case, the USB drive is /dev/sdb.


1.C_ Alternative procedure "C".

You can use this alternative procedure "C" only when the USB drive
is automounted by your distribution or when you mount it yourself.
It should list all mounted filesystems. You have to find and know the size
of the partitions which are already on the USB drive.

  1.C.1_ In a terminal prompt, run:
            df -h

This should display something like the following,
if you have just connected the USB drive.

/dev/sdb1             2,0G  1,9G   87M  96% /media/NANO

In this case, the USB drive is /dev/sdb (discard the number on the end).



2. Now that you have found the device ( in /dev/ ) which
your USB drive is identified with, you can partition and/or format it,
IF IT IS NECESSARY.

   WARNING: backup files (of all and any partitions) of your USB drive
            that you want to preserve,
            onto another device (not the same USB drive).

   WARNING: This process will delete any information that is
            currently stored on any volume/partition of the USB drive.
            Proceed with caution!


2.1_ First we will perform the following steps, so the next procedures
after these ones will be applied on the correct device (USB drive).

These steps ( 2.1_ ) are necessary before either:
  2.1.A_ Deleting old partitions ( step 3_ ), in case you need to; or,
  2.1.B_ Creating new partitions ( step 4_ ), in case you need to.

In the following steps, replace "X" (as in "sdX") with the adequate letter
that identifies your USB drive. BE CAREFUL!

  2.1.1_ If you need to gain root permissions, in a terminal prompt, type
            sudo su

  2.1.2_ To unmount your USB drive, type
            umount /dev/sdX

Remember to replace "X" with the correct letter for your USB drive's device.

  2.1.3_ Type
            fdisk /dev/sdX

Remember to replace "X" with the correct letter for your USB drive's device.



3_ If needed, delete all old partitions that remain on the USB drive.


This deletion procedure is optional,
or it may be needed for some troubleshooting reasons.

The following steps come after the above step 2.1.3_ .
According to step 2.1.3_, we are now applying the following steps
after "fdisk /dev/sdX".


3.1.1_ Press "d" (without quotation marks)
so to proceed to delete a partition.

3.1.2_ Press "1" (the number "one", without quotation marks)
so to select the 1st partition, and then press enter.

3.1.3_ Press "d"
so to proceed to delete another partition
(fdisk should automatically select the second partition).
Continue deleting ALL the partitions of the selected device (the USB drive).


3.2_ If you have just deleted all partitions of your USB drive,
it is recommended to "save and exit" fdisk so
to avoid any compatibility problems in certain rare cases.

Keep your terminal prompt open (with root permissions).

Then (unmount and) disconnect your USB drive and wait several seconds
so the system have enough time to recognize the new status
(USB drive disconnected).


3.3_ After (re)connecting the USB drive, if needed we follow the instructions
in steps number 1_ (so to ID the correct device).
Then we follow the instructions in steps number 2.1_
(so to apply fdisk procedures ahead onto the correct device).



4_ Now we are going to create a new partition (if necessary).

This partitioning procedure is optional,
or it may be needed for some troubleshooting reasons.

The following steps come after the above step 2.1.3_ .
According to step 2.1.3_, we are now applying the following steps
after "fdisk /dev/sdX".

Remember to replace "X" with the correct letter for your USB drive's device.

4.1_ Press "n" (without quotation marks)
so to make a new partition.

4.2_ Press "p"
so to make this partition primary, and press enter.

4.3_ Press "1" (the number "one", without quotation marks)
so to make this the first partition, and then press enter.

4.4_ Press "a" and then press "1" ,
so to make the first primary partition active or bootable.

4.5_ Press enter to accept the default first cylinder.
4.6_ Press enter again to accept the default last cylinder.
4.7_ Press "t"
so to change the partition's ID:

  4.7.A_ If you want to format your USB drive with FAT16, use:
            'W95 FAT16 (LBA)' ==> press "e".

  4.7.B_ If you want to format your USB drive with FAT32
                (needed for partitions larger than 2 GB), use:
            'W95 FAT32 (LBA)' ==> press "c".

NOTE: the partition's ID *relates* the partition to a specific format,
but it is NOT the same as actually *formatting*
the partition with a specific filesystem.


4.8_ Press "w"
so to write the new partition information to the USB drive.

If fdisk was needed for some operation, then this should be the last operation
needed in fdisk, so you may "save and exit" from the fdisk prompt.

Now you are in the normal terminal prompt, still with root permissions.



5_ Now, we create the FAT filesystem (if necessary).

The specific arguments for the format command depends
on the filesystem chosen in the previous step 4.7_ .

5.A_ If you have chosen to format your USB drive in FAT16
( 'W95 FAT16 (LBA)' in step 4.7.A_ ), then in a terminal prompt run:

mkfs.vfat -F 16 /dev/sdX1 (replacing "X" with your USB drive's device letter)

5.B_ If you have chosen to format your USB drive in FAT32
( 'W95 FAT32 (LBA)' in step 4.7.B_ ), then in a terminal prompt run:

mkfs.vfat -F 32 /dev/sdX1 (replacing "X" with your USB drive's device letter)



6_ Write the syslinux MBR to the USB drive.
   The mbr.bin file is located in

            ./ubcd/tools/linux/ubcd2usb/

   of the extracted UBCD iso. Run:

            dd if=mbr.bin of=/dev/sdX

   (replacing "X" with your USB drive's device letter)



7_ Mount the partition of your USB drive.

You can use the GUI mounting utility of your distribution.

If your distribution mounts USB drives automatically,
you can remove and replug your USB drive to achieve this goal.



8_ Copy all files of the extracted UBCD iso to your USB drive.



9_ Install syslinux to the partition of your USB drive.

First make sure that ./ubcd/tools/linux/ubcd2usb/syslinux is executable.

9.1_ If it's not, then run first:

  chmod a+x ./ubcd/tools/linux/ubcd2usb/syslinux (adapt the path if necessary)

9.2_ Once it is executable, run:

sudo ./ubcd/tools/linux/ubcd2usb/syslinux -s -i -a -d /boot/syslinux /dev/sdX1

(replacing "X" with your USB drive's device letter)

NOTE1: The arguments "-s -i -a -d" must be all lowercase.

NOTE2: Depending on your system, the argument "-s" might be not needed.

NOTE3: This syslinux installation command
is NOT valid for syslinux previous to v4.



10_ Now you can boot UBCD from your USB drive,
if your BIOS supports it of course.






Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group