Jump to content

Booting from a USB drive


bcondemi

Recommended Posts

If you have a powerloss . . . read HERE . . . . That is ultra important !!!I will help you with the edit of Lilo.conf . .. because the "Linux-NEW" has to change in 2 places !( And you have to write lilo to the MBR of sdb after the edit B) ):D Bruno

Link to comment
Share on other sites

  • Replies 121
  • Created
  • Last Reply

Top Posters In This Topic

  • bcondemi

    58

  • Bruno

    57

  • teacher

    6

  • ian

    1

Top Posters In This Topic

OK. Getting time for you to log-off! the tweaking will be fine another day!Thank-you!!! I'm going to back-up the drive (to keep all the settings)and print out every page for this topic (for future)Again my compliments for your patience and brilliance!Bruno(2) B)

Link to comment
Share on other sites

Well, you are a really bright pupil my friend . . . that made things a lot easier !!!!I will be online tomorrow at the same time . . we will the edit lilo . . . . . and answer some more questions you probably have.NOTE: We did log in as root for this tweak . . . . that is something we rarely do . . normally we ALWAYS log in as the "user" . . . and then "su" to root if we need to do tasks as root. Read HereB) Bruno

Link to comment
Share on other sites

Hi B(2) I promised to post about the lilo.conf change . . . . . ;) For the last time we will log in as "root" in the PCLos HD install ( Linux-NEW ) ( I do advice you to learn "Vi" as soon as possible because we will need that editor more often and it is the only one that always does the job . . . read about "Vi" here ). The next time we will only ever use the user account and get temporary root permissions for the job we want to do. No more need to chroot this time either . . . After you logged in type in the addressbar of konqueror "file:/etc/" and look for the lilo.conf file . . . here is the new version of it:

default="PCLos"boot=/dev/sdbmap=/boot/mapkeytable=/boot/livecd.kltpromptnowarntimeout=100message=/boot/messagemenu-scheme=wb:bw:wb:bwimage=/boot/vmlinuz-2.6.10-oci7label="Linux-OLD"root=/dev/sdb1initrd=/boot/initrd-2.6.10-oci7.imgappend="devfs=nomount nomce splash=silent"vga=788read-onlyimage=/boot/vmlinuz-2.6.10-oci7label="PCLos"root=/dev/sdb1initrd=/boot/usbinitrd.imgappend="devfs=nomount nomce splash=silent"vga=788read-onlyother=/dev/sdc1label="Windows"
Change the BLUE parts and removve the RED part . . . then save the file and write the new lilo to the MBR of sdb with:
# /sbin/lilo -b /dev/sdb

After that you can reboot and see if all is well ;):thumbsup: BrunoPS: Allow me to promote a site that has Tips specially for Linux users who recently came from Windows: LinuxClues :thumbsup:

Link to comment
Share on other sites

Good evening BrunoI've changed the lilo.conf file but when I go to write with th editor this is what I got[root@localhost root]# /sbin/lilo -b /dev/sdbIgnoring entry 'boot'Added PCLos *Fatal: stat /dev/sdc1: No such file or directory[root@localhost root]#B(2)

Link to comment
Share on other sites

[root@localhost root]# fdisk -1fdisk: invalid option -- 1Usage: fdisk [-b SSZ] [-u] DISK Change partition table fdisk -l [-b SSZ] [-u] DISK List partition table(s) fdisk -s PARTITION Give partition size(s) in blocks fdisk -v Give fdisk versionHere DISK is something like /dev/hdb or /dev/sdaand PARTITION is something like /dev/hda7-u: give Start and End in sector (instead of cylinder) units-b 2048: (for certain MO disks) use 2048-byte sectors[root@localhost root]#B(2)

Link to comment
Share on other sites

You did "fdisk -ONE" . . but it is "fdisk -L" but then a small "L" ;)B) BrunoPS: I bet Windows is on sda now . . . B)

Link to comment
Share on other sites

sorry about that.[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 Linux[root@localhost root]#

Link to comment
Share on other sites

Actually I meant to ask you that tonight.My drive is in (never touched it). I trued to mount it this morning and it said the drive wasn't available. I thought I might have to edit my file allocation table with your assistance becasue I wanted it to automatically mount when I boot up.Also, I was going to delete the booting up windows option in lilo file since I wasn't going to ever use that option anyway.B(2)

Link to comment
Share on other sites

Okay . . Delete that part in /etc/lilo.conf

other=/dev/sdc1label="Windows"
And do again:
# /sbin/lilo -b /dev/sdb

B) BrunoPS: Does windows still boot if you change the BIOS to boot from the HDD ??

Link to comment
Share on other sites

[root@localhost root]# /sbin/lilo -b /dev/sdbIgnoring entry 'boot'Added PCLos *[root@localhost root]#Yes it boots when I change the BIOS.Actually I can bott up to 3 devices.1'st being cd-rom2'nd USB-HDD3'rd SCSI (which is my windows SATA Drive)if the USB drive is on, PCLos on the USB drive boots-upif the USB drive is off, the next boot device is the SCSI (windows will boot)the whole idea was to eliminate a dual boot. I didn't want to touch the MBR in either OS.And that is exaclty what I achieved!B(2)

Link to comment
Share on other sites

the whole idea was to eliminate a dual boot. I didn't want to touch the MBR in either OS.And that is exaclty what I achieved!

Okay all is well from that angle then . . . only we would want the Windows drive accessable from Linux ( and maybe automounted . . . although I have reservations about drives you do not need that are mounted all the time B) )Maybe reboot . . . . and do the "fdisk -l" again to see if it sees the drive now . . . also post me "cat /etc/fstab" and "cat /etc/mtab" after the reboot.B) Bruno
Link to comment
Share on other sites

Actually I agree, the drives should not be mounted all the time. I can mount and unmount them as I need to. I guess I just need the devices to be available for now[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 Linux[root@localhost root]# cat /etc/fstab## Livecd-install Automatically added by livecd-installnone /proc proc defaults 0 0none /dev/pts devpts mode=0620 0 0none /proc/bus/usb usbfs defaults 0 0# fd: H1440/dev/fd0 /mnt/floppy auto user,exec,rw,noauto,iocharset=iso8859-1,codepage=850,umask=0 0 0# cdrom: AOPEN DUW1608/ARR/dev/hdc /mnt/cdrom auto user,exec,ro,noauto,iocharset=iso8859-1,codepage=850,umask=0 0 0# cdrom: ATAPI COMBO48XMAX/dev/hdd /mnt/cdrom2 auto user,exec,ro,noauto,iocharset=iso8859-1,codepage=850,umask=0 0 0# /dev/sdb1, size=20482812, type=131: Journalised FS: ext3 (primary)/dev/sdb1 / ext3 defaults 0 0# /dev/sdb2, size=2040255, type=130: Linux swap (primary)/dev/sdb2 swap swap defaults 0 0# /dev/sdb3, size=133773255, type=131: Journalised FS: ext3 (primary)/dev/sdb3 /home ext3 defaults 0 0# /dev/sdc1, size=40965687, type=7: NTFS (primary)/dev/sdc1 /mnt/win_c ntfs user,exec,ro,noauto,iocharset=iso8859-1,umask=0 0 0# /dev/sdc5, size=357317667, type=11: FAT32 (extended)/dev/sdc5 /mnt/win_d vfat user,exec,rw,noauto,iocharset=iso8859-1,codepage=850,umask=0 0 0[root@localhost root]# cat /etc/mtab/dev/sdb1 / ext3 rw 0 0none /proc proc rw 0 0none /proc/bus/usb usbfs rw 0 0none /sys sysfs rw 0 0/dev/sdb3 /home ext3 rw 0 0[root@localhost root]#

Edited by bcondemi
Link to comment
Share on other sites

The Windows drive is in fstab . . but for some dark reason fdisk does not see the drive and thus it can not be mounted by fstab at boot . . . . . mtab shows that it is indeed not mounted.B) Bruno

Link to comment
Share on other sites

I'm looking at my devices in file manager-super user mode and can see the drive c and d (windows)does that make sense? can't linux see them? I don't understand.B(2)

Link to comment
Share on other sites

I'm looking at my devices in file manager-super user mode and can see the drive c and d (windows)does that make sense? can't linux see them? I don't understand.B(2)

"File-manager super-user mode" in Linux ?? . . Ans can you see what isa on it too ?B) Burno
Link to comment
Share on other sites

not sure what isa is but I clicked on 'applications' 'file tools' 'super user mode'then konquere opens up and shows me all the devices listed.Bruno(2)

Link to comment
Share on other sites

Yep . . that might be old info from before the drive disapeared . . . because if you log in as root . . and type "file:/mnt/win_c" in the addressbar of Konqueror . . do you see the files on C: ??B) Bruno

Link to comment
Share on other sites

I think I will start a new thread for you tomorrow about updating your PCLos . . . it could be that new hardware detection-scripts or the new udev ( that were in the updates ) would solve your problem.I just need time to set up the post and give precise instructions to get the updates smooth and from the correct ( fast ) mirror ( because there will be a few 100 MB ).Also I want to monitor if nothing will change the "usbinitrd.img" we made yesterday to be able to boot from USB.I will send you a PM with a link when the new thread is posted. ( I would like to keep this one as reference for people that want the same thing as you did: "booting from USB-drive" )B) Bruno

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...