[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#497110: boot loader installation failed when dmraid=true



On Saturday 06 September 2008, Giuseppe Iuculano wrote:
> Frans Pop ha scritto:
> > This should be done by a test _inside_ the if statement and not by
> > adding a condition to the if statement:
> >
> > Also, the comment just above that code should be updated!
>
> Done.

Oops, sorry. The idea is OK, but my code was completely wrong.

Best thing is probably to add a small helper function to check for 
multipath:

is_dm_multipath() {
	dmtype=$(dm_table $device)
	[ "$dmtype" = multipath ] || return 1
}

and do the following:
		device=$(cat $dev/device)

		# Skip software RAID (mdadm) devices (/dev/md/X and /dev/mdX)
		$(echo "$device" | grep -Eq "/dev/md/?[0-9]*$") && continue

		# Skip device mapper devices (/dev/mapper/)
		if echo $device | grep -q "^/dev/mapper/"; then
			# Except for dmraid or multipath devices
			if [ -f "$dev/sataraid" ] || is_dm_multipath; then
				:
			else
				continue
			fi
		fi

> >> partman-base
> >
> > This needs a comment in the code and the grep needs '-q'.
>
> Done.

Eh, I do not see any changes in the attached patch...

> >> With this merge dmraid support seems to be more improved,
> >> No more special procedure is needed, simply use dmraid=true and
> >> install Debian
> >
> > I also miss a cleanup of partman-dmraid, or can that udeb be dropped
> > completely? If the last is the case then we need a patch for
> > hw-detect so it no longer gets installed.
>
> I think that udeb can be dropped completely, but please verify.

"I think" is not really enough. We need to verify that nothing that is 
currently in partman-dmraid is still needed.

It _looks_ like it can probably be dropped.
- I think the init.d part got moved to the parted script in partman-base
  with your patch (it looks similar in purpose at least)
- the "Write SATA RAID changes" script should no longer be needed
That only leaves the "experimental" warning. This is still somewhat needed 
IMO as the support for bootloader installation is still a huge hack. Or 
does Ubuntu have a patch for that as well?

If it can be dropped, then the following in hw-detect.sh is no longer 
needed and the surrounding code will need to be changed accordingly:
        if anna-install partman-dmraid; then

We should at least test without the partman-dmraid udeb being loaded 
before we can decide on this.

> >> Automatic/guided and manual partition now seems to work.
> >
> > Then why do you disable guided partitioning in the partman-auto
> > patch?
>
> Where?

My mistake. I misread the patch at first, then typed this comment, then 
read the patch again but forgot to remove this comment from the mail :-/



Reply to: