Discussion:
[Unattended] #1: boot from USB memory
unattended - Trac instance
2010-05-24 20:40:39 UTC
Permalink
#1: boot from USB memory
-------------------------+--------------------------------------------------
Reporter: jjp3 | Owner: parasytic
Type: enhancement | Status: assigned
Priority: major | Milestone:
Component: bootdisk | Version:
Keywords: |
-------------------------+--------------------------------------------------
Changes (by parasytic):

* cc: parasytic (added)
* owner: => parasytic
* status: new => assigned


Comment:

This is a pretty important bug for me, so I'd like to take this. abylons
is exactly right about the BIOS causing problems in some cases. And I
think I have a work-around for it; I built sfdisk from the utils-linux-ng
package, and I want to get rid of the EDD stuff and just trust the kernel
(/sys/block)

On two different Dell machines I have for testing (Vostro 200 and Zino HD)
the BIOS sets the booted drive (especially USB flash drives) to
int13_dev80, and bumps any real hard drives to x81, x82, etc. This is a
problem with the BIOS, but I think it highlights that the BIOS can't be
trusted to determine the "boot device I want to install the OS to".

Thinking out loud for my implementation:

1) Get a list of all hard drives from /sys/block
2a) If there is only one, just use it!
2b) If there is more than one, ask which to use!
3) Get the disk geometry from sfdisk

When asking, it would be a good idea to get as much info about the drives
as possible, like size, vendor strings, etc. I'm not sure how to get the
vendor stuff, even with EDD.
--
Ticket URL: <http://sourceforge.net/apps/trac/unattended/ticket/1#comment:2>
Unattended <https://apps.sourceforge.net/trac/unattended/>
This is a system for fully automating the installation of Windows 2000 Professional and Server, Windows XP, an
unattended - Trac instance
2010-05-26 22:30:30 UTC
Permalink
#1: boot from USB memory
-------------------------+--------------------------------------------------
Reporter: jjp3 | Owner: parasytic
Type: enhancement | Status: assigned
Priority: major | Milestone: 4.9
Component: bootdisk | Version:
Keywords: |
-------------------------+--------------------------------------------------
Changes (by parasytic):

* milestone: => 4.9


Comment:

This is just about done.

I decided to use the fdisk implementation in busybox, rather than building
sfdisk from the utils-linux-ng package. Overall, this change will
increase the busybox executable size by about 10KB (compared to an
additional 55KB if sfdisk is added).

The patch removes EDD, replacing the heads/sectors info gathering with
fdisk. While I was at it, I also changed the partition_table() function
in install.pl to use fdisk -l on linux, because the partition dump made by
parted is ugly (IMO).

When multiple disks are present, linuxboot will now explicitly ask which
disk to install to. I was able to collect vendor and model information on
available disks, along with calculating the size, so it's at least a
reasonable menu. Here's an example of what I get on one of my systems:


More than one suitable boot device found. Please choose one:

1) /dev/sda (160 GB) ATA WDC WD1600AAJS-7
2) /dev/sdb (513 MB) USB Flash Memory
3) /dev/sr0 (493 MB) HL-DT-ST DVD+-RW GSA-H73N
Select: [123]


Note that I copied this from my daily driver, not from a linuxboot
session. Under linuxboot, the flash drive and CD drive are not included,
probably due to the way PCI/SCSI modules are loaded by the master script.

Sadly, the patch duplicates some code that's already on the network share.
Mainly, the choice() implementation and its dependent functions. It would
be nice if some of those functions were separated out to a Perl module. ;)


Finally, I also wrote a script (Bash script ... not sure how well it will
work under other shells ... and not a Perl script, like the others under
tools/) that can install linuxboot to a flash drive. An installation
example:

$ cd linuxboot
$ make download flashboot
$ sudo ./tools/install-flashboot.sh /dev/sdb

The shell script does all kinds of magic, like partitioning and formatting
the device, installing an MBR, syslinux, and copying the boot files.


I'll post my patches when the patches in Tickets #29 and #30 are comitted
to SVN, so that it will be easier for me to manage which of my
modifications belong to this bug. (Maybe mercurial-queues can help me
here? I'm already managing my local repo under mercurial, thanks to
hgsvn) I'll be looking for some peer-review on this one!
--
Ticket URL: <http://sourceforge.net/apps/trac/unattended/ticket/1#comment:3>
Unattended <https://apps.sourceforge.net/trac/unattended/>
This is a system for fully automating the installation of Windows 2000 Professional and Server, Windows XP, and Windows Server 2
unattended - Trac instance
2010-05-28 15:04:10 UTC
Permalink
#1: boot from USB memory
-------------------------+--------------------------------------------------
Reporter: jjp3 | Owner: parasytic
Type: enhancement | Status: assigned
Priority: major | Milestone: 4.9
Component: bootdisk | Version:
Keywords: |
-------------------------+--------------------------------------------------

Comment(by parasytic):

Patch for my first attempt is included. This has worked for me on two
different machines (Dell Zino HD and a Lenovo laptop) both which report
different hard drive geometry! I've also tested it on three completely
different USB flash drives. It's a good start, but this really needs more
testing from the community, IMO. I'll announce this on unattended-devel
to get a larger test surface.

Before this is committed to SVN, I think I would rather have the install-
flashboot script written in Perl, just so it "fits in" with the common
theme. I'm not the best Perl hacker, so I started with a shell script.
--
Ticket URL: <http://sourceforge.net/apps/trac/unattended/ticket/1#comment:4>
Unattended <https://apps.sourceforge.net/trac/unattended/>
This is a system for fully automating the installation of Windows 2000 Professional and Server, Wi
unattended - Trac instance
2010-06-02 20:17:07 UTC
Permalink
#1: boot from USB memory
-------------------------+--------------------------------------------------
Reporter: jjp3 | Owner: parasytic
Type: enhancement | Status: assigned
Priority: major | Milestone: 4.9
Component: bootdisk | Version:
Keywords: |
-------------------------+--------------------------------------------------

Comment(by parasytic):

parted (at least, version 2.2; linuxboot uses version 1.6.22) can be used
to get the disk heads/sectors with the 'units' command:

$ sudo parted -s /dev/sda unit chs print | grep 'geometry' | cut -d ' ' -f
4
19452,255,63.

That can be further parsed to end up with heads=255, sectors=63. I'll
experiment with parted 1.6 at some time. It would be nice to get parted
up-to-date (currently version 2.3) but tickets #5 and #6 need to be
addressed, at the least.
--
Ticket URL: <http://sourceforge.net/apps/trac/unattended/ticket/1#comment:5>
Unattended <https://apps.sourceforge.net/trac/unattended/>
This is a system for fully automating the installation of Windows 2000 Profes
unattended - Trac
2010-11-03 14:43:43 UTC
Permalink
#1: boot from USB memory
-------------------------+--------------------------------------------------
Reporter: jjp3 | Owner: parasytic
Type: enhancement | Status: assigned
Priority: major | Milestone: 4.9
Component: bootdisk | Version:
Keywords: |
-------------------------+--------------------------------------------------

Comment(by parasytic):

We've been using this patch for almost 6 months to create linuxboot flash
drives without any major problems. One or two laptops may not have been
able to boot from the flash drives, but I don't think that's anything that
a patch can solve.

Would be nice to get this upstream so it can receive some additional
testing.
--
Ticket URL: <http://sourceforge.net/apps/trac/unattended/ticket/1#comment:6>
Unattended <https://apps.sourceforge.net/trac/unattended/>
This is a system for fully automating the installation of Windows 2000 Professional and Server, Windows XP, and
unattended - Trac
2011-05-05 17:04:52 UTC
Permalink
#1: boot from USB memory
-------------------------+--------------------------------------------------
Reporter: jjp3 | Owner: parasytic
Type: enhancement | Status: assigned
Priority: major | Milestone:
Component: bootdisk | Version:
Keywords: |
-------------------------+--------------------------------------------------
Changes (by jjp3):

* milestone: 4.9 =>


Comment:

ok enable fdisk on busybox as it does not make any harm, but maybe skip
this for 4.9
--
Ticket URL: <http://sourceforge.net/apps/trac/unattended/ticket/1#comment:7>
Unattended <https://apps.sourceforge.net/trac/unattended/>
This is a system for fully automating the installation of Windows 2000 Professional and Server,
unattended - Trac
2013-10-28 00:31:27 UTC
Permalink
#1: boot from USB memory
-------------------------+--------------------------------------------------
Reporter: jjp3 | Owner: parasytic
Type: enhancement | Status: assigned
Priority: major | Milestone:
Component: bootdisk | Version:
Keywords: |
-------------------------+--------------------------------------------------

Comment(by jjp3):

I am so sorry that I did not had a look on this bug for so long... I added
to my repository and I am testing it.
1) if you have old copy of syslinux (very rare) the script fails.

casa:/home/cheche/unattended/linuxboot/tools# ls ../syslinux-*/mbr/mbr.bin
../syslinux-4.04/mbr/mbr.bin ../syslinux-5.01/mbr/mbr.bin

rm -rf old copy fix it on my case. I will continue testing
--
Ticket URL: <http://sourceforge.net/apps/trac/unattended/ticket/1#comment:8>
Unattended <https://apps.sourceforge.net/trac/unattended/>
This is a system for fully automating the installation of Windows 2000 Professional and Server, Windows XP, and Windo
unattended - Trac
2013-10-28 01:13:46 UTC
Permalink
#1: boot from USB memory
-------------------------+--------------------------------------------------
Reporter: jjp3 | Owner: parasytic
Type: enhancement | Status: assigned
Priority: major | Milestone:
Component: bootdisk | Version:
Keywords: |
-------------------------+--------------------------------------------------

Comment(by jjp3):

Maybe creating a usb img would be nice.
http://www.syslinux.org/wiki/index.php/Hard_disk_images
--
Ticket URL: <http://sourceforge.net/apps/trac/unattended/ticket/1#comment:9>
Unattended <https://apps.sourceforge.net/trac/unattended/>
This is a system for fully automating the installation of Windows 2000 Professional and Server, Windows XP, and Windows
Loading...