LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   boot from card reader??? (https://www.linuxquestions.org/questions/linux-newbie-8/boot-from-card-reader-609544/)

tommytomthms5 12-27-2007 11:51 PM

boot from card reader???
 
i have a laptop with a built in SD card reader.... i would like to try booting linux from it but theres no option in bios

can it still be done?

jschiwal 12-27-2007 11:55 PM

What is on the computer now? If it is NT or XP you could try following the instructions for using windows boot loader to chainload a copy of the mbr from the SD card. If grub can access the SD card this will allow you to boot by selecting an option from the Windows boot menu. ( Google for NT Grub Duel boot ).

If you have Linux on the machine you could try adding an entry in the Grub menu for the SD card. If Linux can see the SD card at all on the Laptop, consider yourself lucky. Many times a TI chip is used that isn't compatible with any kernel module.

tommytomthms5 12-28-2007 12:01 AM

the main os is xp.... i need it for nonfree software and the hard drive is too small to share

edit... it is easily functional in all the modern kernels ive tried so far

jschiwal 12-28-2007 12:05 AM

I think it depends if grub can detect the sd device. The method I mentioned entails using the dd command to copy the first 244 bytes of the MBR to a file. The file is copied to the C:/ drive and the C:/BOOT.INI file is edited to add a menu entry to boot Linux. This will allow you to boot from a Linux partition without altering the MBR on the Windows machine. The first step may be to boot up using a Linux Live distro on CD or DVD, which uses the grub boot loader. Before booting you can enter the Grub shell and check use autocompletion in searching for the kernel and initrd file to load. Doing this you can test out loading the Linux system contained on the SD card and test that system before even editing BOOT.INI.

tommytomthms5 12-28-2007 12:08 AM

step by step on that.... i have a dsl live cd to use for the dd command

jschiwal 12-28-2007 12:16 AM

I don't remember the Line you need to add to the BOOT.INI file. You will need to google for that.

If you have your SD card inserted with Linux on it, and the device is /dev/sdb, then you would use:
sudo dd if=/dev/sdb bs=244 count=1 of=Linux.lnx

This will create a file "Linux.lnx" that you need to save somewhere to copy it to the Windows C drive. If your Live CD has the fuse kernel module and ntfs-3g installed, then you can:
sudo /sbin/modprobe fuse
sudo mount -t ntfs-3g /dev/sda1 /mnt
sudo dd if=/dev/sdb bs=244 count=1 of=Linux.lnx

( this example assumes that /dev/sda1 is your windows C:/ partition. )

Next, edit the C:/BOOT.INI file. You will need to clear the system and hidden attributes to be able to edit it. After you are done, set the system and hidden attributes again.

tommytomthms5 12-28-2007 12:21 AM

well know what screw it the cards barely a gigabit in size so ill just take the easy way out and use my hard drive....

reason being is that looks like a headache for non-promised results

jschiwal 12-28-2007 12:46 AM

Actually, if you install Linux on the hard drive you can use the same technique to boot into Linux. This method doesn't touch the current MBR you use to boot. Instead you install the Linux mbr to the Linux root partition.

Given the limited number of writes on an SD card, it isn't the best thing to use to run a distro on. Also, while reads are fast, writes are very slow.


All times are GMT -5. The time now is 08:51 PM.