Jump to content

Booting from a USB drive


bcondemi

Recommended Posts

  • Replies 121
  • Created
  • Last Reply

Top Posters In This Topic

  • bcondemi

    58

  • Bruno

    57

  • teacher

    6

  • ian

    1

Top Posters In This Topic

And replace it by the other HD ?? . . . Yep you can do that and re-install Mepis and put Grub in the MBR of that drive . . . But then you will have to switch drives every time you want to boot another OS . . . The master / slave option is much simpler and then you can boot both OS without opening your case.;) Bruno

Link to comment
Share on other sites

Ok I can do that. btw with the results that I'm posting, does it seem that the data is not being saved in the correct directory? I'm looking at my desk top and both sda (serial hard drive for windows) is mounted as well as sdc (usb drive).should I unmount everything and start again? maybe I should first and see... failing that, I'll set the harddrive as slave and see if I can write to it?Bruno(2)

Edited by bcondemi
Link to comment
Share on other sites

Aaarch . . . now the USB drive is sdc ? . . . . Is That me or does it keep changing . . I thought it was sda . . . if the USB drive is sdc . . . the command to see fstab had to be:cat /mnt/sdc1/etc/fstab . . . and also the chroot-commads should have sdc1 and not sda1I am confused . . . . ;) . . . . but my day is over and done . . . it is far past midnight and I have to work in the morning . . . . See you tomorrow.:lol: Bruno

Link to comment
Share on other sites

Yes its sdc. Anyway, I didn't realize what the time diff. was. I wll try everything again with the sdc. I'll let you know tomorrow. I usually get home by 5:30 pm (which is what? 11 :30pm there?) 6/7 hours? I'm going to take half the day off tomorrow and come home early so that I have plenty of time to figure this out (and my many questions).thank-you goodnight!

Link to comment
Share on other sites

demo@ttyp1[demo]$ suPassword:root@ttyp1[demo]# mount /dev/sdc1 /mnt/sdc1root@ttyp1[demo]# mount -t devpts none /mnt/sdc1/dev/ptsroot@ttyp1[demo]# mount -t proc none /mnt/sdc1/procroot@ttyp1[demo]# chroot /mnt/sdc1root@ttyp1[/]#after I entered the chroot code, I saw my drive light flash a few times. however I didn't see the command line go to an endless loop of the 'bash' lines afterwords. I stopped here.(at least we got through a few more lines..) ;) what now? Bruno(2)(kind of frustrating huh?)

Link to comment
Share on other sites

Hi B (2)Hurray ! . . That looks much better ! . . . BUT . . . LOL . . . . why did you stop there ?? :P You were supposed to give the "grub-command" and after that umounting what had been mounted . . . :

bash-3.00#  grub-install /dev/sdabash-3.00# exitroot@ttyp1[demo]#root@ttyp1[demo]# umount /mnt/sda1/procroot@ttyp1[demo]# umount /mnt/sda1/dev/ptsroot@ttyp1[demo]# umount /mnt/sda1root@ttyp1[demo]# reboot

See, everything you mount with the commands you now successfully did has to be umounted too before you can shutdown/reboot without damaging the install.Anyway, . . you can still try . . but if you get errors I have a far better idea: ( An absolute brainwave ! )Why don't we put the Linux drive inside the computer and the Windows drive in the USB-dock ?? ( Yep the other way around ! )You will then have to re-install Mepis but at least it will boot and we can then easily adapt Grub to boot Windows ( in the USB-dock ) too !For safety reasons during the install you only have the Linux drive connected and once booting has proven successful we put the Win-drive in the USB. . . . How about that ??B) BrunoPS: If you go through this thread you will see that the mepis drive first was sda . . then sdb . . and now sdc . . . . . that is one more reason why I think swapping the drives ( Windows in USB-dock ) may give a more stable situation :P

Link to comment
Share on other sites

I don't think I stopped there. After I posted I did try it (the grub-install) and I got some error i think. Can't remember but i'll try again today and let you know.I wouldn't be able to reverse the drives because the windows drive is serial and can only be connected to the serial (SATA) connector on the motherboard.btw, I downloaded PC Linux last night. I'm going to have a go at it later and see how it compares to Mepis.Bruno(2)

Edited by bcondemi
Link to comment
Share on other sites

I noticed on your line...root@ttyp1[demo]# chroot /mnt/sda1this is what I gotroot@1[root]# mount /dev/sdc1 mnt/sdc1mount: mount point mnt/sdc1 does not existroot@1[root]# mount /dev/sdc1 /mnt/sdc1root@1[root]# mount -t devpts none /mnt/sdc1/dev/ptsroot@1[root]# mount -t proc none /mnt/sdc1/procroot@1[root]# chroot /mnt/sdc1root@1[/]# grub-install /dev/sdc1Could not find device for /boot: Not found or not a block device.root@1[/]# grub-install /dev/sdcCould not find device for /boot: Not found or not a block device.root@1[/]#I substitutted sda with sdc1 and it workedhowever, then next line...root@1[/]# grub-install /dev/sdaI substituttedroot@1[/]# grub-install /dev/sdc1 and sda1 but both didn't work.. hopefully your still up to check what I did wrong..thank-you Bruno(2)

Link to comment
Share on other sites

Bruno2That is strange. After you mounted it, it should have shown up as there. Or is it saying that it is not a block device? Are you sure Mepis supports booting from the USB drive?

Link to comment
Share on other sites

It says it could be either or. Its shows up as mounted so it must be that it is not a block device. (not sure what that means.)Bruno (1) however has testest mepis and has found it to work. I'm assuming that Mepis is bootable via USB.Bruno(2)

Link to comment
Share on other sites

Hi B2 1). I have done a test, but did not test it on an USB drive ( I have none :D )2). I do not use Grub, and will not use it until they release the update they promised us 3 years ago and adapt it to modern standards. There is only one option left: swap the drives, put Windows on the USB and re-install Mepis on the master. :) Bruno

Link to comment
Share on other sites

PART 2I am just reading a bit on PCLos where it says it is really difficult to boot from USB-HDD too . . . so I think the only option you have is swapping the drives and let Windows be in the USB-dock.Additionally if you want to abandon Mepis and switch to PCLos we will need to clean out the MBR on that HD first. The code for that is ( if the drive is master and thus sda ! ):

dd if=/dev/zero of=/dev/sda bs=512 count=1

( Don't accidentally zero out the one of your Windows drive ! )So the choice is yours . . . . swapping drives and installing Mepis again . . . or swapping drives, zero-out the MBR and then install PCLos.:D Bruno

Link to comment
Share on other sites

I'm going to install the drive (usb) to the (ide) computer. I will remove the windows drive altogether #1 avoid accidently erasing the MBR. #2 it is a serial drive and I can't install it externally to a usb.I'll try Mepis first. I Guess I reinstall (will be hda) then make all the changes we talked about earlier to sdc (or whatever it gets called). re-write the MBR as if it was a USB using code we talked about earlier. and re-install the drive tot he USB dock.I kind of get the process. I'm going to try with both OS's tonight. I'll wait for the weekend to ask questions if things hit a glitch (if you don't mind) keeping in mind the time difference (I'll get up early).thanks for everything!Bruno(2)

Link to comment
Share on other sites

This guy got it to work. I'm sure you understand it all. Think you could guide me through? PCLos ForumsI really really want to boot from my USB HDD (if possible) Lets see what we can do.btw, on a previous post (links to PCLos) what is the checksum number for?thanks Bruno(2)

Edited by bcondemi
Link to comment
Share on other sites

Yep I have seen that post . . . and basically we can do it . . . . but it will not be easy ;)You can start by downloading this rpm ( in Windows ):ftp://ibiblio.org/pub/Linux/distributions...2-9tex.i586.rpmand put it directly in C: ( not in My Documents or Program Files but directly on C: that will make it easier to find it back as soon as you are in Linux :thumbsup: ). Once downloaded the file is called "mkinitrd-4.1.12-9tex.i586.rpm" do not open it . . just leave it there in Windows so we can grab it later.Then start point 1 to 3 of that post you linked to . . . . . and we will pick up from there.:P Bruno

Link to comment
Share on other sites

Just to tell you, my sda right now is my Serial hard drive for windows. I don't think I want to install anything on that drive. I think its called sda because its my primary drive and its a SATA. Otherwise it would be call hda if it was an ide.My usb is called sdb. I checked it when I used the live cd. I believe point 2 means a clean install on the usb drive (in my case its sbd). Am I correct it saying that.Last thing I want to do is continue doing something understanding it to be one thing and maybe you're thinking its something else.When he says swap (lives on sda5) not sure what he means? The installation differs from MEPIS because it asks me about each partition seperately as opposed to installation on the entire disk at once. I'll figure it out.That link, in windows, I click it and can't see anything on that page. Any special way to view the file? I'm using mozilla firefox for windows and nothing happens when I click the link. I just see a few pieces of the page (like its still loading).I seem to hit a road block everytime I try something. Maybe its me?Bruno(2)

Link to comment
Share on other sites

Hi B (2)Yep I mean sdb for the install . . . . . that is correct . . . And I suppose Mepis has made a swap partition on sdb too . . . . anyway the installer of PCLos will see if it is there.About the link . . you should not just click on it but download it . . it is a direct link to the rpm package . . . . . I think in Firefox you rightclick the link and choose "save linlk as" . . and then you get to choose the location wher you want to save it.:devil: BrunoPS: You are late again . . . I am on the point of logging off . . . but if you look here: http://forums.scotsnewsletter.com/index.php?showuser=611 that is my profile and it shows my "local time" . . . . and just so you know, tomorrow I will be online from 19:00 to 24:00 hrs

Link to comment
Share on other sites

I made instructions a few days ago for someone . . .maybe that will help you with the install:( I adapted the major parts to your situation . . . the screenshots are just examples of my HD partitions )You log in as "user" and press the Icon for the HD-installerA GUI from the installer will pop up . . on the first screen you only hit the "Next"button:screen2.jpgThe next screen you will see this:screen3.jpgCheck the little box that says "Format" and put the combobox ( for the Root (/) Device ) on /dev/sdb1 <<----DOUBLE CHECK if that is correctly set !!!The second box for the "Swap Device" will already be correctly set to ??? ( if not, stop here and tell me )The boxes below in the other section can be ignored . . . press "Next"Next screen only gives a summary of what will be done to your partitions:screen4.jpgPress "Next"Now the actual install starts . . screen5.jpgJust move the mouse now and then so the screen does not fall asleep :devil: . . and wait for it to finish. . . . When finished press "Next" ( In rare cases the installer dies prematurely . . . in that case we just will have to start again: pre-format the partition, reboot, install :lol: )Here is an important part . . . the boot-loader . . . it will be set like this:screen6.jpgMarked will be "/dev/sda (Master boot record of drive)" . . that is not what you want . . you want it on sdb . . then you only have to press the Install button . . . and ONLY after you get a popup saying that it was done you press "Next" again.The last screen:screen7.jpgNow this is important . . . . . Where it says 1) you give a password ( you can easily remember ) twice . . . then you press "Write Password"At 2) you delete the "guest" and 3) you make a new user . . . and press "create new user" . . . . . . and press "Finish"You will not be able to boot after this but we will see about that tomorrowGood Luck :DB) BrunoPS: If you have no Swap partition . . . stop and let us make one first tomorrow . . . I will then try to post instructions to do so

Link to comment
Share on other sites

Okay B2 . . . I am logged in for the evening . . . and here is what I want you to do as soon as you are online:Boot the Live version of PCLos and log in as root ( password "root" ) then use the Konqueror browser ( works better with copy and paste then FF ) to log in to the forum.I'd like you to stay on the forum until we are completely finished and copy and paste everything you get printed in the terminal so I can see what works and what not.One important thing: ALL THAT WE MOUNT IN THE TERMINAL HAS TO BE UMOUNTED TOO . . . So that is why we can not stop in the middle of the process.The first commands I want you to give ( and post the results on the forum ) in a terminal are:( NOTE: you do not type the # sign, that one is part of the prompt and just to show you are "root"

# fdisk -l

# ls -al /mnt

# mount

( Copy and paste is slightly easier in Linux then in Windows . . . read here: http://forums.scotsnewsletter.com/index.ph...f=14&t=503&st=3 ):"> BrunoPS: I have all the commands more or less prepared, so the posts can follow one after the other in a quick tempo.

Link to comment
Share on other sites

Here's what I have....[root@localhost root]# fdisk -lDisk /dev/sdb: 80.0 GB, 80026361856 bytes255 heads, 63 sectors/track, 9729 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System/dev/sdb1 1 1275 10241406 83 Linux/dev/sdb2 1276 1402 1020127+ 82 Linux swap/dev/sdb3 1403 9729 66886627+ 83 LinuxDisk /dev/sdc: 203.9 GB, 203928109056 bytes255 heads, 63 sectors/track, 24792 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System/dev/sdc1 * 1 2550 20482843+ 7 HPFS/NTFS/dev/sdc2 2551 24792 178658865 f Win95 Ext'd (LBA)/dev/sdc5 2551 24792 178658833+ b Win95 FAT32[root@localhost root]# ls -al /mnttotal 0drwxr-xr-x 9 root root 200 Apr 9 15:17 ./drwxrwxrwt 14 root root 400 Apr 9 15:17 ../lrwxrwxrwx 1 root root 13 Apr 9 10:17 cdrom -> /initrd/cdrom/drwxr-xr-x 2 root root 40 Apr 9 10:17 cdrom2/drwxr-xr-x 2 root root 40 Apr 9 10:17 floppy/drwxr-xr-x 2 root root 40 Apr 9 10:17 sdb1/drwxr-xr-x 2 root root 40 Apr 9 10:17 sdb3/drwxr-xr-x 2 root root 40 Apr 9 15:17 usbhome/drwxr-xr-x 2 root root 40 Apr 9 10:17 win_c/drwxr-xr-x 2 root root 40 Apr 9 10:17 win_d/[root@localhost root]# mountrootfs on / type rootfs (rw)/dev/root.old on /initrd type ext2 (rw)none on /initrd/proc type proc (rw,nodiratime)/dev/shm on / type tmpfs (rw)none on /dev type tmpfs (rw)/dev/hdd on /initrd/cdrom type iso9660 (ro)/dev/loop/0 on /initrd/loopfs type squashfs (ro)none on /proc type proc (rw,nodiratime)none on /sys type sysfs (rw)none on /dev/pts type devpts (rw)none on /proc/bus/usb type usbfs (rw)[root@localhost root]# Bruno(2)

Link to comment
Share on other sites

Okay I see Linux is on sdb . . . but I see 3 partitions:/dev/sdb1 1 1275 10241406 83 Linux/dev/sdb2 1276 1402 1020127+ 82 Linux swap/dev/sdb3 1403 9729 66886627+ 83 LinuxThe /swap is logic . . . . did you make a separate /home on sdb3 ??:devil: Bruno

Link to comment
Share on other sites

I had Mepis previously on the same drive. It mad the partitions during install.Since they were already there, and I wanted to put a lot of stuff ina home partition and because the drive is large I left it with the 3 partitions.Is it ok the way it is or should I re-format and make only 2 partitions?B(2)

Link to comment
Share on other sites

No no no . . it is okay . . . let us see what is there:

# mount /dev/sdb1 /mnt/sdb1# ls -al /mnt/sdb1# mount /dev/sdc1 /mnt/win_c # ls -al /mnt/win_c

:devil: Bruno

Link to comment
Share on other sites

[root@localhost root]# mount /dev/sdb1 /mnt/sdb1[root@localhost root]# ls -al /mnt/sdb1total 92drwxr-xr-x 20 root root 4096 Apr 8 20:38 ./drwxr-xr-x 9 root root 200 Apr 9 15:17 ../drwxr-xr-x 2 root root 4096 Apr 8 20:28 bin/drwxr-xr-x 2 root root 4096 Apr 8 20:43 boot/drwxrwxrwt 23 root root 4096 Apr 8 20:10 dev/drwxr-xr-x 79 root root 4096 Apr 8 20:45 etc/-rw-r--r-- 1 root root 0 Apr 8 20:28 haltdrwxr-xr-x 2 root root 4096 Apr 8 20:28 home/drwxr-xr-x 2 root root 4096 Apr 8 20:28 initrd/drwxr-xr-x 12 root root 4096 Apr 8 20:28 lib/drwx------ 2 root root 16384 Apr 8 20:25 lost+found/drwxr-xr-x 7 root root 4096 Apr 8 20:38 mnt/drwxr-xr-x 2 root root 4096 Feb 18 19:41 opt/drwxr-xr-x 3 root root 4096 Apr 8 20:38 proc/drwxr-x--- 29 root root 4096 Apr 8 20:44 root/drwxr-xr-x 2 root root 8192 Apr 8 20:28 sbin/drwxr-xr-x 2 root root 4096 Apr 8 20:38 swap/drwxr-xr-x 10 root root 4096 Apr 8 20:28 sys/drwxrwxrwx 2 root root 4096 Apr 8 20:42 tmp/drwxr-xr-x 13 root root 4096 Apr 8 20:28 usr/drwxr-xr-x 19 root root 4096 Apr 8 20:37 var/[root@localhost root]# mount /dev/sdc1 /mnt/win_c[root@localhost root]# ls -al /mnt/win_ctotal 813409dr-x------ 1 root root 8192 Apr 9 09:05 ./drwxr-xr-x 9 root root 200 Apr 9 15:17 ../-r-------- 1 root root 0 Mar 8 18:55 28645308.Dat-r-------- 1 root root 0 Mar 5 22:33 AUTOEXEC.BAT-r-------- 1 root root 194 Apr 5 18:29 boot.inidr-x------ 1 root root 0 Apr 2 14:06 Config.Msi/-r-------- 1 root root 0 Mar 5 22:33 CONFIG.SYSdr-x------ 1 root root 4096 Mar 5 22:39 Documents and Settings/dr-x------ 1 root root 0 Mar 26 08:23 epson/dr-x------ 1 root root 0 Mar 6 06:49 EPSONREG/dr-x------ 1 root root 0 Mar 15 16:49 hijack this/-r-------- 1 root root 519 Mar 11 19:29 hpfr3420.xml-r-------- 1 root root 292 Mar 11 19:29 hpfr3425.log-r-------- 1 root root 0 Mar 5 22:33 IO.SYSdr-x------ 1 root root 0 Apr 8 17:04 Linux download/-r-------- 1 root root 0 Mar 5 22:33 MSDOS.SYSdr-x------ 1 root root 0 Mar 6 06:55 MSOCache/-r-------- 1 root root 47580 Aug 28 2002 NTDETECT.COM-r-------- 1 root root 233632 Aug 28 2002 ntldr-r-------- 1 root root 805306368 Apr 8 20:45 pagefile.sysdr-x------ 1 root root 16384 Apr 2 14:06 Program Files/dr-x------ 1 root root 0 Mar 6 06:42 RECYCLER/dr-x------ 1 root root 0 Mar 5 22:38 System Volume Information/dr-x------ 1 root root 0 Mar 6 08:18 temp/-r-------- 1 root root 27262976 Apr 7 21:17 VIRTPART.DATdr-x------ 1 root root 45056 Apr 2 16:37 WINDOWS/[root@localhost root]# I have to type in every code manually because my cut and paste dosn't seem to work. The cursor is solid black in the terminal.Anyway I can type it in.. it works..B(2)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...